mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-02 04:27:12 +02:00
HackStudio: Warn about unsaved changes on opening different project
This commit is contained in:
committed by
Andreas Kling
parent
82b88c6e16
commit
283d8d3928
Notes:
sideshowbarker
2024-07-18 05:23:41 +09:00
Author: https://github.com/donaghylennon Commit: https://github.com/SerenityOS/serenity/commit/283d8d39289 Pull-request: https://github.com/SerenityOS/serenity/pull/9185 Reviewed-by: https://github.com/itamar8910 ✅
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user