GUI: prevent lag when drawing on wave editor

This commit is contained in:
tildearrow 2023-07-15 02:50:49 -05:00
parent d096d5eb3c
commit 99e55136f3
2 changed files with 8 additions and 2 deletions

View file

@ -2419,7 +2419,7 @@ void FurnaceGUI::processDrags(int dragX, int dragY) {
if (y>waveDragMax) y=waveDragMax;
if (y<waveDragMin) y=waveDragMin;
waveDragTarget[x]=y;
e->notifyWaveChange(curWave);
notifyWaveChange=true;
MARK_MODIFIED;
}
}
@ -3746,6 +3746,11 @@ bool FurnaceGUI::loop() {
midiLock.unlock();
}
if (notifyWaveChange) {
notifyWaveChange=false;
e->notifyWaveChange(curWave);
}
eventTimeEnd=SDL_GetPerformanceCounter();
if (SDL_GetWindowFlags(sdlWin)&SDL_WINDOW_MINIMIZED) {
@ -6718,6 +6723,7 @@ FurnaceGUI::FurnaceGUI():
preserveChanPos(false),
wantScrollList(false),
noteInputPoly(true),
notifyWaveChange(false),
displayPendingIns(false),
pendingInsSingle(false),
displayPendingRawSample(false),