summaryrefslogtreecommitdiff
path: root/editor/plugins/node_3d_editor_plugin.cpp
diff options
context:
space:
mode:
authorYaohua Xiong <xiongyaohua@gmail.com>2023-01-04 14:35:00 +0800
committerYaohua Xiong <xiongyaohua@gmail.com>2023-01-04 20:09:10 +0800
commit20f909219eca916450350300b30e445f3fce14af (patch)
tree70412186aa025e7f04369bd58d1062deafb6aace /editor/plugins/node_3d_editor_plugin.cpp
parent0160fea1ced6697d5b72ad2f41332e8768080be4 (diff)
Remove side effect of the `handles` method
Diffstat (limited to 'editor/plugins/node_3d_editor_plugin.cpp')
-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 8e2b9b4bce..94dda44fee 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 {