소스 검색

Merge pull request #47629 from Calinou/editor-allow-center-selection-without-selection

Allow Center Selection to work without any selection in 2D/3D editors
Rémi Verschelde 4 년 전
부모
커밋
2e87857d75
2개의 변경된 파일0개의 추가작업 그리고 7개의 파일을 삭제
  1. 0 3
      editor/plugins/canvas_item_editor_plugin.cpp
  2. 0 4
      editor/plugins/node_3d_editor_plugin.cpp

+ 0 - 3
editor/plugins/canvas_item_editor_plugin.cpp

@@ -5385,9 +5385,6 @@ void CanvasItemEditor::_focus_selection(int p_op) {
 			rect = rect.merge(canvas_item_rect);
 		}
 	};
-	if (count == 0) {
-		return;
-	}
 
 	if (p_op == VIEW_CENTER_TO_SELECTION) {
 		center = rect.position + rect.size / 2;

+ 0 - 4
editor/plugins/node_3d_editor_plugin.cpp

@@ -3560,10 +3560,6 @@ void Node3DEditorViewport::reset() {
 }
 
 void Node3DEditorViewport::focus_selection() {
-	if (!get_selected_count()) {
-		return;
-	}
-
 	Vector3 center;
 	int count = 0;