mirror of
https://github.com/aseprite/aseprite.git
synced 2025-04-09 18:44:46 +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
|
// temporarily, we need to adjust the grid to the new temporal
|
||||||
// grid origin matching the new m_dstImage position.
|
// grid origin matching the new m_dstImage position.
|
||||||
auto newCelPosition = m_grid.tileToCanvas(m_bounds.origin());
|
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
|
// The origin of m_bounds must be in canvas position
|
||||||
m_bounds.setOrigin(newCelPosition);
|
m_bounds.setOrigin(newCelPosition);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user