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

Allow Center Selection to work without any selection in 2D/3D editors
This commit is contained in:
Rémi Verschelde 2021-04-16 12:47:47 +02:00 committed by GitHub
commit 2e87857d75
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 7 deletions

View file

@ -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;

View file

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