瀏覽代碼

PixelPaint: Restore image size from snapshots

This will make undoing a resize or rotate operation actually restore the
size of the image as well.
Andreas Kling 2 年之前
父節點
當前提交
32b73dd4af
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      Userland/Applications/PixelPaint/Image.cpp

+ 2 - 0
Userland/Applications/PixelPaint/Image.cpp

@@ -265,6 +265,8 @@ ErrorOr<void> Image::restore_snapshot(Image const& snapshot)
     if (!layer_selected)
         select_layer(&layer(0));
 
+    m_size = snapshot.size();
+    did_change_rect();
     did_modify_layer_stack();
     return {};
 }