From 283d8d39289db37db53c74738813e193ccfee1a1 Mon Sep 17 00:00:00 2001 From: Lennon Donaghy Date: Tue, 3 Aug 2021 20:59:10 +0100 Subject: HackStudio: Warn about unsaved changes on opening different project --- Userland/DevTools/HackStudio/HackStudioWidget.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Userland/DevTools/HackStudio') 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); -- cgit v1.2.3