From db3185723e9be1d653aa18a5876c3c21a08975b3 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 28 Nov 2017 15:07:49 +0100 Subject: [PATCH] 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 --- pcbnew/tools/edit_tool.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index af13f79098..4218d9ec28 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -389,7 +389,6 @@ int EDIT_TOOL::Main( const TOOL_EVENT& aEvent ) m_dragging = false; // Are selected items being dragged? bool restore = false; // Should items' state be restored when finishing the tool? - bool lockOverride = false; controls->ShowCursor( true ); controls->SetSnapping( true ); @@ -444,8 +443,6 @@ int EDIT_TOOL::Main( const TOOL_EVENT& aEvent ) if( lockFlags == SELECTION_LOCKED ) break; - else if( lockFlags == SELECTION_LOCK_OVERRIDE ) - lockOverride = true; // Save items, so changes can be undone 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 ) ) { - if( !lockOverride ) - break; // Finish - - lockOverride = false; + break; // Finish } } while( ( evt = Wait() ) ); //Should be assignment not equality test