HackStudio: Warn about unsaved changes on opening different project

This commit is contained in:
Lennon Donaghy 2021-08-03 20:59:10 +01:00 committed by Andreas Kling
commit 283d8d3928
Notes: sideshowbarker 2024-07-18 05:23:41 +09:00

View file

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