quick fix for incomplete drawing wonk

master
zetaPRIME 2022-03-20 02:26:06 -04:00
parent b1c8377db5
commit 7f471bf5ce
5 changed files with 14 additions and 1 deletions

3
notes
View File

@ -59,7 +59,8 @@ TODO {
focusable control to set param
}
qt update causing some patchboard artifacting on mouse movement
- qt update causing some patchboard artifacting on mouse movement
eventually switch from indiscriminate mouse-move updates to only on certain events
look into performance/timing/sync of audio engine; it's having buffer issues way more than it feels like it should

View File

@ -3,3 +3,5 @@
using namespace Xybrid::Config;
bool UIConfig::verticalKnobs = false;
bool UIConfig::fullSceneRefresh = true;

View File

@ -4,5 +4,7 @@ namespace Xybrid::Config {
namespace UIConfig {
/// Determines if KnobGadgets turn with vertical mouse movement instead of horizontal.
extern bool verticalKnobs;
extern bool fullSceneRefresh;
}
}

View File

@ -26,6 +26,7 @@ using Xybrid::UI::PatchboardScene;
#include "data/graph.h"
#include "data/project.h"
using namespace Xybrid::Data;
#include "config/uiconfig.h"
#include "config/pluginregistry.h"
using namespace Xybrid::Config;
#include "fileops.h"
@ -182,6 +183,11 @@ void PatchboardScene::keyReleaseEvent(QKeyEvent* e) {
if (!e->isAccepted() && !e->isAutoRepeat()) stopPreview(Util::unshiftedKey(e->key()));
}
void PatchboardScene::mouseMoveEvent(QGraphicsSceneMouseEvent* e) {
QGraphicsScene::mouseMoveEvent(e);
if (UIConfig::fullSceneRefresh) update(); // force full update (for now)
}
void PatchboardScene::startPreview(int key, int16_t note) {
stopPreview(key); // end current preview first, if applicable
auto p = graph->project->shared_from_this();

View File

@ -34,6 +34,8 @@ namespace Xybrid::UI {
void keyPressEvent(QKeyEvent*) override;
void keyReleaseEvent(QKeyEvent*) override;
void mouseMoveEvent(QGraphicsSceneMouseEvent*) override;
void refresh();
};
}