mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-07 09:56:59 +00:00
Reduce the area generated for cmd::CopyRegion when we move a selection
This commit is contained in:
parent
4aa56ff703
commit
3159acdc5c
@ -453,8 +453,14 @@ void PixelsMovement::stampImage()
|
||||
TiledMode::NONE, m_transaction,
|
||||
ExpandCelCanvas::None);
|
||||
|
||||
// TODO can we reduce this region?
|
||||
gfx::Region modifiedRegion(expand.getDestCanvas()->bounds());
|
||||
// We cannot use cel->bounds() because cel->image() is nullptr
|
||||
gfx::Rect modifiedRect(
|
||||
cel->x(),
|
||||
cel->y(),
|
||||
image->width(),
|
||||
image->height());
|
||||
|
||||
gfx::Region modifiedRegion(modifiedRect);
|
||||
expand.validateDestCanvas(modifiedRegion);
|
||||
|
||||
expand.getDestCanvas()->copy(
|
||||
|
Loading…
Reference in New Issue
Block a user