Revert "instrument editor undo: don't check delta if no user input has come in that could potentially have dirtied the editor"

This reverts commit ad53b33d7c.
This commit is contained in:
tildearrow 2024-08-19 02:49:14 -05:00
parent 4f3d61c0f1
commit 251be67b69
5 changed files with 19 additions and 51 deletions

View file

@ -3704,7 +3704,6 @@ bool FurnaceGUI::loop() {
ImGui::GetIO().AddKeyEvent(ImGuiKey_Backspace,false);
injectBackUp=false;
}
while (SDL_PollEvent(&ev)) {
WAKE_UP;
ImGui_ImplSDL2_ProcessEvent(&ev);
@ -3721,16 +3720,13 @@ bool FurnaceGUI::loop() {
}
case SDL_MOUSEBUTTONUP:
pointUp(ev.button.x,ev.button.y,ev.button.button);
insEditMayBeDirty=true;
break;
case SDL_MOUSEBUTTONDOWN:
pointDown(ev.button.x,ev.button.y,ev.button.button);
insEditMayBeDirty=true;
break;
case SDL_MOUSEWHEEL:
wheelX+=ev.wheel.x;
wheelY+=ev.wheel.y;
insEditMayBeDirty=true;
break;
case SDL_WINDOWEVENT:
switch (ev.window.event) {
@ -3807,14 +3803,12 @@ bool FurnaceGUI::loop() {
if (!ImGui::GetIO().WantCaptureKeyboard) {
keyDown(ev);
}
insEditMayBeDirty=true;
#ifdef IS_MOBILE
injectBackUp=true;
#endif
break;
case SDL_KEYUP:
// for now
insEditMayBeDirty=true;
break;
case SDL_DROPFILE:
if (ev.drop.file!=NULL) {
@ -7151,11 +7145,6 @@ bool FurnaceGUI::loop() {
willCommit=false;
}
// To check for instrument editor modification, we need an up-to-date `insEditMayBeDirty`
// (based on incoming user input events), and we want any possible instrument modifications
// to already have been made.
checkRecordInstrumentUndoStep();
if (shallDetectScale) {
if (--shallDetectScale<1) {
if (settings.dpiScale<0.5f) {
@ -8322,7 +8311,6 @@ FurnaceGUI::FurnaceGUI():
localeRequiresKorean(false),
prevInsData(NULL),
cachedCurInsPtr(NULL),
insEditMayBeDirty(false),
pendingLayoutImport(NULL),
pendingLayoutImportLen(0),
pendingLayoutImportStep(0),