Explorar o código

Merge pull request #91732 from Naputt1/fix-2d-editor-selection

Fix 2d editor selection persisting after application loses focus.
Rémi Verschelde hai 1 ano
pai
achega
84f6a3de31
Modificáronse 1 ficheiros con 7 adicións e 0 borrados
  1. 7 0
      editor/plugins/canvas_item_editor_plugin.cpp

+ 7 - 0
editor/plugins/canvas_item_editor_plugin.cpp

@@ -4073,6 +4073,13 @@ void CanvasItemEditor::_notification(int p_what) {
 				override_camera_button->set_pressed(false);
 			}
 		} break;
+
+		case NOTIFICATION_APPLICATION_FOCUS_OUT: {
+			if (drag_type != DRAG_NONE) {
+				_reset_drag();
+				viewport->queue_redraw();
+			}
+		} break;
 	}
 }