mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:27:35 +00:00
PixelPaint: Update recent files list on project save
This is consistent with the behavior of other applications.
This commit is contained in:
parent
1bd8f4eb03
commit
3fa9c9bda4
1 changed files with 4 additions and 0 deletions
|
@ -202,12 +202,16 @@ ErrorOr<void> MainWidget::initialize_menubar(GUI::Window& window)
|
||||||
auto* editor = current_image_editor();
|
auto* editor = current_image_editor();
|
||||||
VERIFY(editor);
|
VERIFY(editor);
|
||||||
editor->save_project_as();
|
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&) {
|
m_save_image_action = GUI::CommonActions::make_save_action([&](auto&) {
|
||||||
auto* editor = current_image_editor();
|
auto* editor = current_image_editor();
|
||||||
VERIFY(editor);
|
VERIFY(editor);
|
||||||
editor->save_project();
|
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));
|
TRY(file_menu->try_add_action(*m_new_image_action));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue