diff --git a/extern/imgui_patched/imgui.cpp b/extern/imgui_patched/imgui.cpp index b670b2ad8..ceb71b325 100644 --- a/extern/imgui_patched/imgui.cpp +++ b/extern/imgui_patched/imgui.cpp @@ -9574,7 +9574,9 @@ void ImGui::UpdateInputEvents(bool trickle_fast_inputs) } else if (e->Type == ImGuiInputEventType_Text) { - bool trickle_fast_inputs = true; // forcing trickle for Text event + // forcing trickle for Text event, but only when interacting with keydown or mouse button + if ((key_changed && trickle_interleaved_keys_and_text) || mouse_button_changed != 0) + break; // Trickling Rule: Stop processing queued events if keys/mouse have been interacted with if (trickle_fast_inputs && ((key_changed && trickle_interleaved_keys_and_text) || mouse_button_changed != 0 || mouse_moved || mouse_wheeled)) diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index 6437ecab7..f40d7f27d 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -3235,19 +3235,6 @@ void FurnaceGUI::pointUp(int x, int y, int button) { if (dragMobileEditButton) { dragMobileEditButton=false; } - if (selecting) { - if (!selectingFull) cursor=selEnd; - finishSelection(); - if (!mobileUI) { - demandScrollX=true; - if (cursor.xCoarse==selStart.xCoarse && cursor.xFine==selStart.xFine && cursor.y==selStart.y && - cursor.xCoarse==selEnd.xCoarse && cursor.xFine==selEnd.xFine && cursor.y==selEnd.y) { - if (!settings.cursorMoveNoScroll) { - updateScroll(cursor.y); - } - } - } - } } void FurnaceGUI::pointMotion(int x, int y, int xrel, int yrel) { @@ -4502,6 +4489,21 @@ bool FurnaceGUI::loop() { MEASURE(effectList,drawEffectList()); } + // release selection if mouse released + if (ImGui::IsMouseReleased(ImGuiMouseButton_Left) && selecting) { + if (!selectingFull) cursor=selEnd; + finishSelection(); + if (!mobileUI) { + demandScrollX=true; + if (cursor.xCoarse==selStart.xCoarse && cursor.xFine==selStart.xFine && cursor.y==selStart.y && + cursor.xCoarse==selEnd.xCoarse && cursor.xFine==selEnd.xFine && cursor.y==selEnd.y) { + if (!settings.cursorMoveNoScroll) { + updateScroll(cursor.y); + } + } + } + } + activateTutorial(GUI_TUTORIAL_OVERVIEW); if (inspectorOpen) ImGui::ShowMetricsWindow(&inspectorOpen); diff --git a/src/gui/pattern.cpp b/src/gui/pattern.cpp index 72d953b7a..b29b87c80 100644 --- a/src/gui/pattern.cpp +++ b/src/gui/pattern.cpp @@ -938,6 +938,7 @@ void FurnaceGUI::drawPattern() { ImGui::TableNextColumn(); } } + ImGui::EndDisabled(); ImGui::PopStyleVar(); oldRow=curRow;