Merge pull request #61292 from KoBeWi/hack_your_way_to_fix_the_bug

This commit is contained in:
JFonS 2022-06-02 13:02:48 +02:00 committed by GitHub
commit 8e3084cc91
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -8126,7 +8126,13 @@ void Node3DEditorPlugin::edit(Object *p_object) {
}
bool Node3DEditorPlugin::handles(Object *p_object) const {
return p_object->is_class("Node3D");
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;
}
}
Dictionary Node3DEditorPlugin::get_state() const {