Fix clickable pivot pos in StandbyState (fix #1608)

Also reported in https://community.aseprite.org/t/pivot-point-doesnt-recalibrate-when-setting-its-direction/1228
This commit is contained in:
Gaspar Capello 2018-05-03 11:39:01 -03:00
parent dd82f6bbcc
commit a7c7e82aa8
2 changed files with 7 additions and 2 deletions

View File

@ -657,7 +657,12 @@ void MovingPixelsState::dropPixels()
Transformation MovingPixelsState::getTransformation(Editor* editor)
{
return m_pixelsMovement->getTransformation();
// m_pixelsMovement can be null in the final onMouseDown(), after we
// called dropPixels() and we're just going to the previous state.
if (m_pixelsMovement)
return m_pixelsMovement->getTransformation();
else
return StandbyState::getTransformation(editor);
}
bool MovingPixelsState::isActiveDocument() const

View File

@ -257,7 +257,7 @@ bool StandbyState::onMouseDown(Editor* editor, MouseMessage* msg)
// Get the handle covered by the mouse.
HandleType handle = transfHandles->getHandleAtPoint(editor,
msg->position(),
document->getTransformation());
getTransformation(editor));
if (handle != NoHandle) {
int x, y, opacity;