Browse Source

Prevent disapearance of mouse when SpinBox is hidden while doing a drag modification.

ajreckof 2 năm trước cách đây
mục cha
commit
0c4d37e682
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  1. 3 0
      scene/gui/spin_box.cpp

+ 3 - 0
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;