From 0c4d37e6822bd93ce360b466bfc47ea4d21f633d Mon Sep 17 00:00:00 2001 From: ajreckof <66184050+ajreckof@users.noreply.github.com> Date: Sat, 3 Jun 2023 14:50:03 +0200 Subject: [PATCH] Prevent disapearance of mouse when SpinBox is hidden while doing a drag modification. --- scene/gui/spin_box.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scene/gui/spin_box.cpp b/scene/gui/spin_box.cpp index a0c8f7c91f27..8a7f3c67a92c 100644 --- a/scene/gui/spin_box.cpp +++ b/scene/gui/spin_box.cpp @@ -249,6 +249,9 @@ void SpinBox::_notification(int p_what) { _update_text(); } break; + case NOTIFICATION_VISIBILITY_CHANGED: + drag.allowed = false; + [[fallthrough]]; case NOTIFICATION_EXIT_TREE: { _release_mouse(); } break;