sys: Clear project after loading crash backup

This commit is contained in:
WerWolv
2023-01-10 08:57:29 +01:00
parent dbcb13f473
commit ef3627321c
2 changed files with 6 additions and 1 deletions

View File

@@ -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();