summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-01-05 15:01:29 +0100
committerRémi Verschelde <rverschelde@gmail.com>2023-01-05 15:01:29 +0100
commit1d14c054a12dacdc193b589e4afb0ef319ee2aae (patch)
tree27a8e7c2a22e97b722ce9a41d585966951cc4721
parent798582acf0610899792e71d9f186710245eff872 (diff)
parent20f909219eca916450350300b30e445f3fce14af (diff)
Merge pull request #70907 from xiongyaohua/fix_path3d_gizmo_not_show
Remove side effect of the `handles` method
-rw-r--r--editor/plugins/node_3d_editor_plugin.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp
index e203565395..1147d5ff8c 100644
--- a/editor/plugins/node_3d_editor_plugin.cpp
+++ b/editor/plugins/node_3d_editor_plugin.cpp
@@ -8670,13 +8670,7 @@ void Node3DEditorPlugin::edit(Object *p_object) {
}
bool Node3DEditorPlugin::handles(Object *p_object) const {
- if (p_object->is_class("Node3D")) {
- return true;
- } else {
- // This ensures that gizmos are cleared when selecting a non-Node3D node.
- const_cast<Node3DEditorPlugin *>(this)->edit((Object *)nullptr);
- return false;
- }
+ return p_object->is_class("Node3D");
}
Dictionary Node3DEditorPlugin::get_state() const {