1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 15:38:10 +00:00

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
parent 82b88c6e16
commit 283d8d3928

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