diff options
author | JFonS <joan.fonssanchez@gmail.com> | 2018-09-02 22:31:03 +0200 |
---|---|---|
committer | JFonS <joan.fonssanchez@gmail.com> | 2018-09-02 22:31:03 +0200 |
commit | 4a412943d4a80703a178396be34e2576f891bc80 (patch) | |
tree | 07eb2c8df112a98e7308b71425be72ae9f0a1234 /scene/3d | |
parent | cb63cc86e5ff8d70dc074381eb5f7d32298cd2ef (diff) |
Fix selection of instanced scenes in 3D
Diffstat (limited to 'scene/3d')
-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() {} |