From 3fa9c9bda48d86ae5fa3759aa91a2e0b6ba47d22 Mon Sep 17 00:00:00 2001 From: Tim Ledbetter Date: Sat, 1 Apr 2023 00:32:35 +0100 Subject: [PATCH] PixelPaint: Update recent files list on project save This is consistent with the behavior of other applications. --- Userland/Applications/PixelPaint/MainWidget.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Userland/Applications/PixelPaint/MainWidget.cpp b/Userland/Applications/PixelPaint/MainWidget.cpp index f5e1bfc8ae..f045c84666 100644 --- a/Userland/Applications/PixelPaint/MainWidget.cpp +++ b/Userland/Applications/PixelPaint/MainWidget.cpp @@ -202,12 +202,16 @@ ErrorOr MainWidget::initialize_menubar(GUI::Window& window) auto* editor = current_image_editor(); VERIFY(editor); editor->save_project_as(); + auto path_string = String::from_deprecated_string(editor->path()).release_value_but_fixme_should_propagate_errors(); + GUI::Application::the()->set_most_recently_open_file(path_string); }); m_save_image_action = GUI::CommonActions::make_save_action([&](auto&) { auto* editor = current_image_editor(); VERIFY(editor); editor->save_project(); + auto path_string = String::from_deprecated_string(editor->path()).release_value_but_fixme_should_propagate_errors(); + GUI::Application::the()->set_most_recently_open_file(path_string); }); TRY(file_menu->try_add_action(*m_new_image_action));