Skip to content

Commit

Permalink
Merge pull request godotengine#16973 from JFonS/fix_initial_gizmo_vis…
Browse files Browse the repository at this point in the history
…ibility

Fix visibility of gizmos on scene load
  • Loading branch information
akien-mga authored Feb 24, 2018
2 parents 36285cd + 99d740c commit bc4b7bc
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions scene/3d/spatial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,9 @@ void Spatial::_notification(int p_what) {
if (data.gizmo.is_valid()) {
data.gizmo->create();
if (data.gizmo->can_draw()) {
data.gizmo->redraw();
if (is_visible_in_tree()) {
data.gizmo->redraw();
}
}
data.gizmo->transform();
}
Expand Down Expand Up @@ -409,7 +411,9 @@ void Spatial::set_gizmo(const Ref<SpatialGizmo> &p_gizmo) {

data.gizmo->create();
if (data.gizmo->can_draw()) {
data.gizmo->redraw();
if (is_visible_in_tree()) {
data.gizmo->redraw();
}
}
data.gizmo->transform();
}
Expand Down

0 comments on commit bc4b7bc

Please sign in to comment.