|
@@ -8043,9 +8043,37 @@ void Node3DEditor::_selection_changed() {
|
|
|
selected->update_gizmos();
|
|
|
selected = nullptr;
|
|
|
}
|
|
|
+
|
|
|
+ // Ensure gizmo updates are performed when the selection changes
|
|
|
+ // outside of the 3D view (see GH-106713).
|
|
|
+ if (!is_visible()) {
|
|
|
+ const List<Node *> &top_selected = editor_selection->get_top_selected_node_list();
|
|
|
+ if (top_selected.size() == 1) {
|
|
|
+ Node3D *new_selected = Object::cast_to<Node3D>(top_selected.back()->get());
|
|
|
+ if (new_selected != selected) {
|
|
|
+ gizmos_dirty = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
update_transform_gizmo();
|
|
|
}
|
|
|
|
|
|
+void Node3DEditor::refresh_dirty_gizmos() {
|
|
|
+ if (!gizmos_dirty) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ const List<Node *> &top_selected = editor_selection->get_top_selected_node_list();
|
|
|
+ if (top_selected.size() == 1) {
|
|
|
+ Node3D *new_selected = Object::cast_to<Node3D>(top_selected.back()->get());
|
|
|
+ if (new_selected != selected) {
|
|
|
+ edit(new_selected);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ gizmos_dirty = false;
|
|
|
+}
|
|
|
+
|
|
|
void Node3DEditor::_refresh_menu_icons() {
|
|
|
bool all_locked = true;
|
|
|
bool all_grouped = true;
|
|
@@ -9843,7 +9871,7 @@ void Node3DEditorPlugin::make_visible(bool p_visible) {
|
|
|
spatial_editor->show();
|
|
|
spatial_editor->set_process(true);
|
|
|
spatial_editor->set_physics_process(true);
|
|
|
-
|
|
|
+ spatial_editor->refresh_dirty_gizmos();
|
|
|
} else {
|
|
|
spatial_editor->hide();
|
|
|
spatial_editor->set_process(false);
|