mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:57:45 +00:00
HackStudio: Warn about unsaved changes on opening different project
This commit is contained in:
parent
82b88c6e16
commit
283d8d3928
1 changed files with 2 additions and 0 deletions
|
@ -189,6 +189,8 @@ void HackStudioWidget::on_action_tab_change()
|
||||||
|
|
||||||
void HackStudioWidget::open_project(const String& root_path)
|
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) {
|
if (chdir(root_path.characters()) < 0) {
|
||||||
perror("chdir");
|
perror("chdir");
|
||||||
exit(1);
|
exit(1);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue