mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:38:11 +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
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