1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:37:35 +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:
Matthias-Sleurink 2022-02-03 11:22:35 +01:00 committed by Brian Gianforcaro
parent e74e6087b0
commit 032ffbcf64
3 changed files with 12 additions and 1 deletions

View file

@ -114,6 +114,8 @@ public:
bool show_active_layer_boundary() const { return m_show_active_layer_boundary; }
void set_show_active_layer_boundary(bool);
void set_loaded_from_image(bool);
private:
explicit ImageEditor(NonnullRefPtr<Image>);
@ -170,6 +172,8 @@ private:
Variant<Gfx::StandardCursor, NonnullRefPtr<Gfx::Bitmap>> m_active_cursor { Gfx::StandardCursor::None };
Selection m_selection;
bool m_loaded_from_image { true };
};
}