diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-09-05 18:11:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-05 18:11:56 +0200 |
commit | 8804eb8c061634f740af04132b2c68e5c27c449d (patch) | |
tree | b9cdc64ce976705bec97cc6d21546c77fd6a8dfb /scene | |
parent | 2f4912ec69a07d62a4b56a5be6d8ada59516b310 (diff) | |
parent | 4a412943d4a80703a178396be34e2576f891bc80 (diff) |
Merge pull request #21707 from JFonS/fix_instanced_selection
Fix selection of instanced scenes in 3D
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() {} |