Explorar o código

Merge pull request #77804 from ajreckof/prevent-disapearance-of-mouse-when-SpinBox-is-hidden-while-doing-a-drag-modification

Prevent disappearance of mouse when SpinBox is hidden while dragging
Rémi Verschelde %!s(int64=2) %!d(string=hai) anos
pai
achega
7469b43392
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      scene/gui/spin_box.cpp

+ 3 - 0
scene/gui/spin_box.cpp

@@ -263,6 +263,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;