summaryrefslogtreecommitdiff
path: root/Userland/Applications/PixelPaint/Selection.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2022-08-25 20:58:17 +0200
committerAndreas Kling <kling@serenityos.org>2022-08-26 01:04:52 +0200
commit49deb936be01cd96920dd0e8b34ab69743027b6e (patch)
tree1f4af0afb9417eb43b72d03492602aef109c4e1b /Userland/Applications/PixelPaint/Selection.cpp
parentd571159aebbf1e7442622efb8346d5c0657c1e03 (diff)
downloadserenity-49deb936be01cd96920dd0e8b34ab69743027b6e.zip
PixelPaint: Make selection changes undoable
Using the Rectangle Select Tool will now generate undo/redo commands like any other tool. :^)
Diffstat (limited to 'Userland/Applications/PixelPaint/Selection.cpp')
-rw-r--r--Userland/Applications/PixelPaint/Selection.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/Userland/Applications/PixelPaint/Selection.cpp b/Userland/Applications/PixelPaint/Selection.cpp
index 41863c2c14..386ab9cbef 100644
--- a/Userland/Applications/PixelPaint/Selection.cpp
+++ b/Userland/Applications/PixelPaint/Selection.cpp
@@ -54,4 +54,9 @@ void Selection::remove_client(SelectionClient& client)
m_clients.remove(&client);
}
+void Selection::set_mask(Mask mask)
+{
+ m_mask = move(mask);
+}
+
}