Fix the origin position of a newly created cel after a ToolLoop in pixels mode

This commit is contained in:
David Capello 2020-10-13 12:27:40 -03:00
parent 84dbb5557e
commit 2dadd1839c

View File

@ -251,8 +251,10 @@ void ExpandCelCanvas::commit()
m_cel->data()->setImage(newImage, m_layer);
m_cel->setPosition(
m_cel->position() +
// TODO we should get the exact coordinate from getTrimDstImageBounds()
m_grid.tileToCanvas(trimBounds.origin()));
(m_layer->isTilemap() ?
// TODO we should get the exact coordinate from getTrimDstImageBounds()
m_grid.tileToCanvas(trimBounds.origin()):
trimBounds.origin()));
}
// And add the cel again in the layer.