Fix visibility of gizmos on scene load
(cherry picked from commit 99d740c46e
)
This commit is contained in:
parent
039fc750d5
commit
69274ef368
|
@ -188,8 +188,10 @@ void Spatial::_notification(int p_what) {
|
|||
if (data.gizmo.is_valid()) {
|
||||
data.gizmo->create();
|
||||
if (data.gizmo->can_draw()) {
|
||||
if (is_visible_in_tree()) {
|
||||
data.gizmo->redraw();
|
||||
}
|
||||
}
|
||||
data.gizmo->transform();
|
||||
}
|
||||
}
|
||||
|
@ -409,8 +411,10 @@ void Spatial::set_gizmo(const Ref<SpatialGizmo> &p_gizmo) {
|
|||
|
||||
data.gizmo->create();
|
||||
if (data.gizmo->can_draw()) {
|
||||
if (is_visible_in_tree()) {
|
||||
data.gizmo->redraw();
|
||||
}
|
||||
}
|
||||
data.gizmo->transform();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue