mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-20 17:58:18 +03:00
PixelPaint: Mark editor as unmodified when creating a default image
This is similar to opening an empty text file in TextEditor, the user is only asked to saved changes if they have made any changes to it.
This commit is contained in:
parent
fc5c327751
commit
915211252d
Notes:
sideshowbarker
2024-07-17 21:37:29 +09:00
Author: https://github.com/mustafaquraish Commit: https://github.com/SerenityOS/serenity/commit/915211252d8 Pull-request: https://github.com/SerenityOS/serenity/pull/11632
@ -112,6 +112,7 @@ void MainWidget::initialize_menubar(GUI::Window& window)
|
||||
auto& editor = create_new_editor(*image);
|
||||
auto image_title = dialog->image_name().trim_whitespace();
|
||||
editor.set_title(image_title.is_empty() ? "Untitled" : image_title);
|
||||
editor.undo_stack().set_current_unmodified();
|
||||
|
||||
m_layer_list_widget->set_image(image);
|
||||
m_layer_list_widget->set_selected_layer(bg_layer);
|
||||
@ -728,6 +729,7 @@ void MainWidget::create_default_image()
|
||||
|
||||
auto& editor = create_new_editor(*image);
|
||||
editor.set_active_layer(bg_layer);
|
||||
editor.undo_stack().set_current_unmodified();
|
||||
}
|
||||
|
||||
void MainWidget::create_image_from_clipboard()
|
||||
|
Loading…
Reference in New Issue
Block a user