From ef3627321c3d5a7db4753f1e467bec4fafb5c00b Mon Sep 17 00:00:00 2001 From: WerWolv Date: Tue, 10 Jan 2023 08:57:29 +0100 Subject: [PATCH] sys: Clear project after loading crash backup --- lib/external/pattern_language | 2 +- plugins/builtin/source/content/welcome_screen.cpp | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/external/pattern_language b/lib/external/pattern_language index 58f1702be..f5ae1a5b8 160000 --- a/lib/external/pattern_language +++ b/lib/external/pattern_language @@ -1 +1 @@ -Subproject commit 58f1702be038aca08a01ddd61d41b1c724b43a31 +Subproject commit f5ae1a5b85c6fd7ef07e133fae480a6cda08dd55 diff --git a/plugins/builtin/source/content/welcome_screen.cpp b/plugins/builtin/source/content/welcome_screen.cpp index 2feb039cf..17dcdafa6 100644 --- a/plugins/builtin/source/content/welcome_screen.cpp +++ b/plugins/builtin/source/content/welcome_screen.cpp @@ -174,6 +174,11 @@ namespace hex::plugin::builtin { ImGui::SetCursorPosX(width / 9); if (ImGui::Button("hex.builtin.welcome.safety_backup.restore"_lang, ImVec2(width / 3, 0))) { ProjectFile::load(s_safetyBackupPath); + ProjectFile::clearPath(); + + for (const auto &provider : ImHexApi::Provider::getProviders()) + provider->markDirty(); + fs::remove(s_safetyBackupPath); ImGui::CloseCurrentPopup();