summaryrefslogtreecommitdiff
path: root/Userland/DevTools/HackStudio
diff options
context:
space:
mode:
authorLennon Donaghy <donaghylennon@gmail.com>2021-08-03 20:59:10 +0100
committerAndreas Kling <kling@serenityos.org>2021-08-22 10:30:06 +0200
commit283d8d39289db37db53c74738813e193ccfee1a1 (patch)
tree1c87433393d776a92a03daf56f4564a03e283427 /Userland/DevTools/HackStudio
parent82b88c6e16b00db1b31da00e29964b75c539bbf2 (diff)
downloadserenity-283d8d39289db37db53c74738813e193ccfee1a1.zip
HackStudio: Warn about unsaved changes on opening different project
Diffstat (limited to 'Userland/DevTools/HackStudio')
-rw-r--r--Userland/DevTools/HackStudio/HackStudioWidget.cpp2
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);