瀏覽代碼

Merge pull request #70907 from xiongyaohua/fix_path3d_gizmo_not_show

Remove side effect of the `handles` method
Rémi Verschelde 2 年之前
父節點
當前提交
1d14c054a1
共有 1 個文件被更改,包括 1 次插入7 次删除
  1. 1 7
      editor/plugins/node_3d_editor_plugin.cpp

+ 1 - 7
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 {