diff options
Diffstat (limited to 'editor')
-rw-r--r-- | editor/plugins/node_3d_editor_plugin.cpp | 8 | ||||
-rw-r--r-- | editor/scene_tree_dock.cpp | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp index 8bd6e39252..aecbf817c4 100644 --- a/editor/plugins/node_3d_editor_plugin.cpp +++ b/editor/plugins/node_3d_editor_plugin.cpp @@ -2405,18 +2405,18 @@ void Node3DEditorViewport::_notification(int p_what) { } Transform t = sp->get_global_gizmo_transform(); + VisualInstance3D *vi = Object::cast_to<VisualInstance3D>(sp); + AABB new_aabb = vi ? vi->get_aabb() : _calculate_spatial_bounds(sp); exist = true; - if (se->last_xform == t && !se->last_xform_dirty) { + if (se->last_xform == t && se->aabb == new_aabb && !se->last_xform_dirty) { continue; } changed = true; se->last_xform_dirty = false; se->last_xform = t; - VisualInstance3D *vi = Object::cast_to<VisualInstance3D>(sp); - - se->aabb = vi ? vi->get_aabb() : _calculate_spatial_bounds(sp); + se->aabb = new_aabb; t.translate(se->aabb.position); diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp index 75dc840738..fa2270dcd6 100644 --- a/editor/scene_tree_dock.cpp +++ b/editor/scene_tree_dock.cpp @@ -1141,7 +1141,7 @@ void SceneTreeDock::_notification(int p_what) { node_shortcuts->add_child(button_custom); button_custom->set_text(TTR("Other Node")); button_custom->set_icon(get_theme_icon("Add", "EditorIcons")); - button_custom->connect("pressed", callable_mp(this, &SceneTreeDock::_tool_selected), make_binds(TOOL_NEW, false)); + button_custom->connect("pressed", callable_bind(callable_mp(this, &SceneTreeDock::_tool_selected), TOOL_NEW, false)); node_shortcuts->add_spacer(); create_root_dialog->add_child(node_shortcuts); |