mirror of
https://github.com/aseprite/aseprite.git
synced 2024-11-20 14:21:45 +00:00
Simplify grid origin adjustment on ExpandCelCanvas::ExpandCelCanvas()
This commit is contained in:
parent
580fe1b030
commit
e5bfccbcd2
@ -140,7 +140,8 @@ ExpandCelCanvas::ExpandCelCanvas(
|
||||
// temporarily, we need to adjust the grid to the new temporal
|
||||
// grid origin matching the new m_dstImage position.
|
||||
auto newCelPosition = m_grid.tileToCanvas(m_bounds.origin());
|
||||
m_grid.origin(m_grid.origin() - m_cel->position() + newCelPosition);
|
||||
m_grid.origin(newCelPosition);
|
||||
|
||||
|
||||
// The origin of m_bounds must be in canvas position
|
||||
m_bounds.setOrigin(newCelPosition);
|
||||
|
Loading…
Reference in New Issue
Block a user