1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 05:07:35 +00:00

PixelPaint: Use UndoStack instead of History

This allows to share more code with other undo systems.
This commit is contained in:
BenJilks 2020-11-13 13:19:24 +00:00 committed by Andreas Kling
parent 7707ebcd63
commit a27d118085
7 changed files with 41 additions and 134 deletions

View file

@ -31,6 +31,7 @@
#include <AK/RefCounted.h>
#include <AK/RefPtr.h>
#include <AK/Vector.h>
#include <LibGUI/Command.h>
#include <LibGUI/Forward.h>
#include <LibGfx/Forward.h>
#include <LibGfx/Rect.h>
@ -98,4 +99,16 @@ private:
HashTable<ImageClient*> m_clients;
};
class ImageUndoCommand : public GUI::Command {
public:
ImageUndoCommand(Image& image);
virtual void undo() override;
virtual void redo() override;
private:
RefPtr<Image> m_snapshot;
Image& m_image;
};
}