diff options
Diffstat (limited to 'scene')
-rw-r--r-- | scene/3d/spatial.cpp | 22 | ||||
-rw-r--r-- | scene/3d/spatial.h | 1 |
2 files changed, 8 insertions, 15 deletions
diff --git a/scene/3d/spatial.cpp b/scene/3d/spatial.cpp index 3f494264e7..d52f634639 100644 --- a/scene/3d/spatial.cpp +++ b/scene/3d/spatial.cpp @@ -185,10 +185,8 @@ 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(); - } + if (is_visible_in_tree()) { + data.gizmo->redraw(); } data.gizmo->transform(); } @@ -423,10 +421,8 @@ void Spatial::set_gizmo(const Ref<SpatialGizmo> &p_gizmo) { if (data.gizmo.is_valid() && is_inside_world()) { data.gizmo->create(); - if (data.gizmo->can_draw()) { - if (is_visible_in_tree()) { - data.gizmo->redraw(); - } + if (is_visible_in_tree()) { + data.gizmo->redraw(); } data.gizmo->transform(); } @@ -452,12 +448,10 @@ void Spatial::_update_gizmo() { return; data.gizmo_dirty = false; if (data.gizmo.is_valid()) { - if (data.gizmo->can_draw()) { - if (is_visible_in_tree()) - data.gizmo->redraw(); - else - data.gizmo->clear(); - } + if (is_visible_in_tree()) + data.gizmo->redraw(); + else + data.gizmo->clear(); } #endif } diff --git a/scene/3d/spatial.h b/scene/3d/spatial.h index bc054a8763..8d3c32d116 100644 --- a/scene/3d/spatial.h +++ b/scene/3d/spatial.h @@ -48,7 +48,6 @@ public: virtual void clear() = 0; virtual void redraw() = 0; virtual void free() = 0; - virtual bool can_draw() const = 0; SpatialGizmo(); virtual ~SpatialGizmo() {} |