diff options
author | Lennon Donaghy <donaghylennon@gmail.com> | 2021-08-03 20:59:10 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-08-22 10:30:06 +0200 |
commit | 283d8d39289db37db53c74738813e193ccfee1a1 (patch) | |
tree | 1c87433393d776a92a03daf56f4564a03e283427 /Userland/DevTools/HackStudio | |
parent | 82b88c6e16b00db1b31da00e29964b75c539bbf2 (diff) | |
download | serenity-283d8d39289db37db53c74738813e193ccfee1a1.zip |
HackStudio: Warn about unsaved changes on opening different project
Diffstat (limited to 'Userland/DevTools/HackStudio')
-rw-r--r-- | Userland/DevTools/HackStudio/HackStudioWidget.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Userland/DevTools/HackStudio/HackStudioWidget.cpp b/Userland/DevTools/HackStudio/HackStudioWidget.cpp index f267dfc399..4ded82222e 100644 --- a/Userland/DevTools/HackStudio/HackStudioWidget.cpp +++ b/Userland/DevTools/HackStudio/HackStudioWidget.cpp @@ -189,6 +189,8 @@ void HackStudioWidget::on_action_tab_change() void HackStudioWidget::open_project(const String& root_path) { + if (warn_unsaved_changes("There are unsaved changes, do you want to save before closing current project?") == ContinueDecision::No) + return; if (chdir(root_path.characters()) < 0) { perror("chdir"); exit(1); |