mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:57:35 +00:00
PixelPaint: Show more specific Undo/Redo action text
The Undo/Redo actions now tell you what kind of action will be undone/redone. This is achieved by adding an "action text" field to the ImageUndoCommand and having everyone who calls did_complete_action() provide this text.
This commit is contained in:
parent
101eb53de5
commit
bf25b0a0b5
15 changed files with 57 additions and 20 deletions
|
@ -481,9 +481,10 @@ void Image::did_change_rect(Gfx::IntRect const& a_modified_rect)
|
|||
client->image_did_change_rect(modified_rect);
|
||||
}
|
||||
|
||||
ImageUndoCommand::ImageUndoCommand(Image& image)
|
||||
ImageUndoCommand::ImageUndoCommand(Image& image, String action_text)
|
||||
: m_snapshot(image.take_snapshot().release_value_but_fixme_should_propagate_errors())
|
||||
, m_image(image)
|
||||
, m_action_text(move(action_text))
|
||||
{
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue