summaryrefslogtreecommitdiff
path: root/src/editor/editor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/editor/editor.cpp')
-rw-r--r--src/editor/editor.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/editor/editor.cpp b/src/editor/editor.cpp
index 63360d1..3873913 100644
--- a/src/editor/editor.cpp
+++ b/src/editor/editor.cpp
@@ -4,6 +4,31 @@
GAME_EDITOR* editor = 0;
+void editor_clear_gui_state_refs( GAME_EDITOR* e ) {
+ if( !e )
+ return;
+
+ e->gui.new_map_popup = 0;
+
+ e->gui.v2d = 0;
+ e->gui.v3d = 0;
+ e->gui.gridlabel = 0;
+ e->gui.props = 0;
+ e->gui.tool = 0;
+
+ e->gui.assets = 0;
+ e->gui.status = 0;
+ e->gui.assets_scroll = 0;
+
+ e->gui.header_toolbar = 0;
+ e->gui.header_viewtype_label = 0;
+ e->gui.header_back = 0;
+ e->gui.header_mode_2d = 0;
+ e->gui.header_mode_3d = 0;
+ e->gui.header_mode_sim = 0;
+ e->gui.header_viewtype = 0;
+}
+
static void editor_push_undo_action( GAME_EDITOR* e, const GAME_EDITOR::EDITOR_UNDO_ACTION& action ) {
if( !e )
return;
@@ -410,6 +435,7 @@ STAT editor_close( GAME_EDITOR* e ) {
I32 w = e->wnd->w, h = e->wnd->h;
gui_free( e->wnd );
+ editor_clear_gui_state_refs( e );
e->wnd = gui_editorwindow( w, h );
} );