summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2022-08-22 19:11:08 +0200
committerAndreas Kling <kling@serenityos.org>2022-08-22 21:55:19 +0200
commit4491ef8ae68945f9a94f09ce321f206b9bea4498 (patch)
treee0ee504b877998596b593cbb2df21292120a30db /Userland
parentd7cf36ec6c2b2f43b9e2aa6c335fff92b236747a (diff)
downloadserenity-4491ef8ae68945f9a94f09ce321f206b9bea4498.zip
PixelPaint: Relayout ImageEditor immediately when image rect changes
This avoids a jarring effect where we'd "snap" the image into place upon the next resize event.
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Applications/PixelPaint/ImageEditor.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/Userland/Applications/PixelPaint/ImageEditor.cpp b/Userland/Applications/PixelPaint/ImageEditor.cpp
index 57d58f9ef2..e3db66dc17 100644
--- a/Userland/Applications/PixelPaint/ImageEditor.cpp
+++ b/Userland/Applications/PixelPaint/ImageEditor.cpp
@@ -551,6 +551,7 @@ void ImageEditor::image_did_change_rect(Gfx::IntRect const& new_image_rect)
{
set_original_rect(new_image_rect);
set_content_rect(new_image_rect);
+ relayout();
}
void ImageEditor::image_select_layer(Layer* layer)