File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -4011,6 +4011,14 @@ void Node3DEditorViewport::set_state(const Dictionary &p_state) {
40114011 _menu_option (VIEW_GIZMOS);
40124012 }
40134013 }
4014+ if (p_state.has (" grid" )) {
4015+ bool grid = p_state[" grid" ];
4016+
4017+ int idx = view_menu->get_popup ()->get_item_index (VIEW_GRID);
4018+ if (view_menu->get_popup ()->is_item_checked (idx) != grid) {
4019+ _menu_option (VIEW_GRID);
4020+ }
4021+ }
40144022 if (p_state.has (" information" )) {
40154023 bool information = p_state[" information" ];
40164024
@@ -4089,6 +4097,7 @@ Dictionary Node3DEditorViewport::get_state() const {
40894097 d[" listener" ] = viewport->is_audio_listener_3d ();
40904098 d[" doppler" ] = view_menu->get_popup ()->is_item_checked (view_menu->get_popup ()->get_item_index (VIEW_AUDIO_DOPPLER));
40914099 d[" gizmos" ] = view_menu->get_popup ()->is_item_checked (view_menu->get_popup ()->get_item_index (VIEW_GIZMOS));
4100+ d[" grid" ] = view_menu->get_popup ()->is_item_checked (view_menu->get_popup ()->get_item_index (VIEW_GRID));
40924101 d[" information" ] = view_menu->get_popup ()->is_item_checked (view_menu->get_popup ()->get_item_index (VIEW_INFORMATION));
40934102 d[" frame_time" ] = view_menu->get_popup ()->is_item_checked (view_menu->get_popup ()->get_item_index (VIEW_FRAME_TIME));
40944103 d[" half_res" ] = subviewport_container->get_stretch_shrink () > 1 ;
You can’t perform that action at this time.
0 commit comments