浏览代码

Make sure View Grid state saved with scene state

marynate 11 年之前
父节点
当前提交
f5c56f4a3d
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      tools/editor/plugins/spatial_editor_plugin.cpp

+ 1 - 2
tools/editor/plugins/spatial_editor_plugin.cpp

@@ -2345,8 +2345,7 @@ void SpatialEditor::set_state(const Dictionary& p_state) {
 		bool use = d["show_grid"];
 
 		if (use!=view_menu->get_popup()->is_item_checked( view_menu->get_popup()->get_item_index(MENU_VIEW_GRID))) {
-			view_menu->get_popup()->set_item_checked( view_menu->get_popup()->get_item_index(MENU_VIEW_GRID), use );
-			grid_enabled=use;
+			_menu_item_pressed(MENU_VIEW_GRID);
 		}
 	}