diff options
author | marynate <mary.w.nate@gmail.com> | 2014-07-15 13:29:03 +0800 |
---|---|---|
committer | marynate <mary.w.nate@gmail.com> | 2014-07-15 13:29:36 +0800 |
commit | e55ef57f6253673ab9a5553d47964cd378423334 (patch) | |
tree | 1ee754051181c8a98353180738675b63ea6ab590 /tools/editor | |
parent | 9ff6d55822647c87eef392147ea15641d0922d47 (diff) |
Fixed #470 View grid toggle in 3d not working
Diffstat (limited to 'tools/editor')
-rw-r--r-- | tools/editor/plugins/spatial_editor_plugin.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/editor/plugins/spatial_editor_plugin.cpp b/tools/editor/plugins/spatial_editor_plugin.cpp index 1bf425f3f3..227cfa5c11 100644 --- a/tools/editor/plugins/spatial_editor_plugin.cpp +++ b/tools/editor/plugins/spatial_editor_plugin.cpp @@ -2653,6 +2653,13 @@ void SpatialEditor::_menu_item_pressed(int p_option) { grid_enabled=!is_checked; + for(int i=0;i<3;++i) { + if (grid_enable[i]) { + VisualServer::get_singleton()->instance_geometry_set_flag(grid_instance[i],VS::INSTANCE_FLAG_VISIBLE,grid_enabled); + grid_visible[i]=grid_enabled; + } + } + view_menu->get_popup()->set_item_checked( view_menu->get_popup()->get_item_index(p_option), grid_enabled ); |