Fix OccluderPolyShape handles disappear after release click

(cherry picked from commits dd3bda9156
and 98803d4edd)
This commit is contained in:
Haoyu Qiu 2023-07-27 16:56:00 +08:00 committed by Rémi Verschelde
parent 56ce1d809d
commit 57ad3e9670
No known key found for this signature in database
GPG Key ID: C3336907360768E1

View File

@ -7013,11 +7013,12 @@ void SpatialEditorPlugin::edit(Object *p_object) {
bool SpatialEditorPlugin::handles(Object *p_object) const {
if (p_object->is_class("Spatial")) {
return true;
} else {
}
if (!p_object->is_class("Resource")) {
// This ensures that gizmos are cleared when selecting a non-Spatial node.
const_cast<SpatialEditorPlugin *>(this)->edit((Object *)nullptr);
return false;
}
return false;
}
Dictionary SpatialEditorPlugin::get_state() const {