mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-07 08:39:22 +00:00
PixelPaint: Don't overwrite images with project file on save
The ImageEditor tracks whether it was loaded from an image (the alternative being a project file.) If it was loaded from an image file we redirect save project actions to save as instead.
This commit is contained in:
parent
e74e6087b0
commit
032ffbcf64
Notes:
sideshowbarker
2024-07-17 19:44:34 +09:00
Author: https://github.com/Matthias-Sleurink 🔰
Commit: 032ffbcf64
Pull-request: https://github.com/SerenityOS/serenity/pull/12268
Issue: https://github.com/SerenityOS/serenity/issues/11889
Reviewed-by: https://github.com/AtkinsSJ
Reviewed-by: https://github.com/bgianfo
3 changed files with 12 additions and 1 deletions
|
@ -712,6 +712,7 @@ void MainWidget::open_image(Core::File& file)
|
|||
|
||||
auto& image = *m_loader.release_image();
|
||||
auto& editor = create_new_editor(image);
|
||||
editor.set_loaded_from_image(m_loader.is_raw_image());
|
||||
editor.set_path(file.filename());
|
||||
editor.undo_stack().set_current_unmodified();
|
||||
m_layer_list_widget->set_image(&image);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue