File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ Editor::is_active()
80
80
return true ;
81
81
} else {
82
82
auto * self = Editor::current ();
83
- return self && !self->m_leveltested ;
83
+ return self && !self->m_leveltested && self-> m_after_setup ;
84
84
}
85
85
}
86
86
@@ -105,6 +105,7 @@ Editor::Editor() :
105
105
m_sector(),
106
106
m_levelloaded(false ),
107
107
m_leveltested(false ),
108
+ m_after_setup(false ),
108
109
m_tileset(nullptr ),
109
110
m_widgets(),
110
111
m_overlay_widget(),
@@ -615,13 +616,15 @@ Editor::leave()
615
616
{
616
617
MouseCursor::current ()->set_icon (nullptr );
617
618
Compositor::s_render_lighting = true ;
619
+ m_after_setup = false ;
618
620
}
619
621
620
622
void
621
623
Editor::setup ()
622
624
{
623
625
Tile::draw_editor_images = true ;
624
626
Sector::s_draw_solids_only = false ;
627
+ m_after_setup = true ;
625
628
if (!m_levelloaded) {
626
629
627
630
#if 0
Original file line number Diff line number Diff line change @@ -198,6 +198,7 @@ class Editor final : public Screen,
198
198
199
199
bool m_levelloaded;
200
200
bool m_leveltested;
201
+ bool m_after_setup; // Set to true after setup function finishes and to false after leave function finishes
201
202
202
203
TileSet* m_tileset;
203
204
You can’t perform that action at this time.
0 commit comments