summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-03-19 11:11:04 +0100
committerStanislaw Halik <sthalik@misaki.pl>2023-03-19 11:11:04 +0100
commitf54c64e3d8d8efaeb128b042e662a7d75a802707 (patch)
tree67dc907374493f36a238d829f6bc0eeaf9e4a58b
parenta39791fd400e97f741db2879e17a4d41e854bfd1 (diff)
editor: kill popup when loading game
-rw-r--r--editor/app.cpp4
-rw-r--r--editor/imgui.cpp2
2 files changed, 1 insertions, 5 deletions
diff --git a/editor/app.cpp b/editor/app.cpp
index 89f9ccf6..93fca78b 100644
--- a/editor/app.cpp
+++ b/editor/app.cpp
@@ -84,9 +84,7 @@ void app::reset_world(struct world&& w_)
_editor.on_release();
_editor.clear_selection();
- inspectors.clear();
- _pending_popup = false;
- _popup_target = {};
+ kill_popups(true);
clear_keys();
cursor = {};
diff --git a/editor/imgui.cpp b/editor/imgui.cpp
index 6ac6e7fa..9700a8f7 100644
--- a/editor/imgui.cpp
+++ b/editor/imgui.cpp
@@ -168,9 +168,7 @@ void app::kill_popups(bool hard)
ImGui::CloseCurrentPopup();
if (hard)
- {
inspectors.clear();
- }
ImGui::FocusWindow(nullptr);
}