Drop a locked item after a move operation with a single click

Locked items used to require two clicks to drop an item. This patch
enables dropping with a single click.

Fixes: lp:1716580
* https://bugs.launchpad.net/kicad/+bug/1716580
This commit is contained in:
Maciej Suminski 2017-11-28 15:07:49 +01:00
parent 6105b15b2e
commit db3185723e
1 changed files with 1 additions and 7 deletions

View File

@ -389,7 +389,6 @@ int EDIT_TOOL::Main( const TOOL_EVENT& aEvent )
m_dragging = false; // Are selected items being dragged? m_dragging = false; // Are selected items being dragged?
bool restore = false; // Should items' state be restored when finishing the tool? bool restore = false; // Should items' state be restored when finishing the tool?
bool lockOverride = false;
controls->ShowCursor( true ); controls->ShowCursor( true );
controls->SetSnapping( true ); controls->SetSnapping( true );
@ -444,8 +443,6 @@ int EDIT_TOOL::Main( const TOOL_EVENT& aEvent )
if( lockFlags == SELECTION_LOCKED ) if( lockFlags == SELECTION_LOCKED )
break; break;
else if( lockFlags == SELECTION_LOCK_OVERRIDE )
lockOverride = true;
// Save items, so changes can be undone // Save items, so changes can be undone
for( auto item : selection ) for( auto item : selection )
@ -546,10 +543,7 @@ int EDIT_TOOL::Main( const TOOL_EVENT& aEvent )
else if( evt->IsMouseUp( BUT_LEFT ) || evt->IsClick( BUT_LEFT ) ) else if( evt->IsMouseUp( BUT_LEFT ) || evt->IsClick( BUT_LEFT ) )
{ {
if( !lockOverride ) break; // Finish
break; // Finish
lockOverride = false;
} }
} while( ( evt = Wait() ) ); //Should be assignment not equality test } while( ( evt = Wait() ) ); //Should be assignment not equality test