Save the drag origin only on the first click

This commit is contained in:
Maciej Suminski 2017-07-27 10:54:08 +02:00
parent 58c32367ee
commit 75f68061a4
1 changed files with 4 additions and 1 deletions

View File

@ -178,7 +178,10 @@ bool TOOL_DISPATCHER::handleMouseButton( wxEvent& aEvent, int aIndex, bool aMoti
if( down ) // Handle mouse button press
{
st->downTimestamp = wxGetLocalTimeMillis();
st->dragOrigin = m_lastMousePos;
if( !st->pressed ) // save the drag origin on the first click only
st->dragOrigin = m_lastMousePos;
st->downPosition = m_lastMousePos;
st->dragMaxDelta = 0;
st->pressed = true;