Selection: allow optional locked item edit

When looping main, we should not exclude locked items without prompting
the user first.

Fixes: lp:1804979
* https://bugs.launchpad.net/kicad/+bug/1804979
This commit is contained in:
Seth Hillbrand 2018-11-25 11:53:26 -08:00
parent 2cfcb2b9fb
commit 4a0467bbd0
1 changed files with 2 additions and 2 deletions

View File

@ -343,7 +343,7 @@ int EDIT_TOOL::Main( const TOOL_EVENT& aEvent )
// try looking for the stuff under mouse cursor (i.e. Kicad old-style hover selection) // try looking for the stuff under mouse cursor (i.e. Kicad old-style hover selection)
auto& selection = m_selectionTool->RequestSelection( auto& selection = m_selectionTool->RequestSelection(
[]( const VECTOR2I& aPt, GENERAL_COLLECTOR& aCollector ) []( const VECTOR2I& aPt, GENERAL_COLLECTOR& aCollector )
{ EditToolSelectionFilter( aCollector, EXCLUDE_LOCKED | EXCLUDE_TRANSIENTS ); } ); { EditToolSelectionFilter( aCollector, EXCLUDE_TRANSIENTS ); } );
if( m_dragging || selection.Empty() ) if( m_dragging || selection.Empty() )
return 0; return 0;
@ -356,7 +356,7 @@ int EDIT_TOOL::Main( const TOOL_EVENT& aEvent )
// when it is the curr_item. // when it is the curr_item.
selection = m_selectionTool->RequestSelection( selection = m_selectionTool->RequestSelection(
[]( const VECTOR2I& aPt, GENERAL_COLLECTOR& aCollector ) []( const VECTOR2I& aPt, GENERAL_COLLECTOR& aCollector )
{ EditToolSelectionFilter( aCollector, EXCLUDE_LOCKED | EXCLUDE_LOCKED_PADS | EXCLUDE_TRANSIENTS ); } ); { EditToolSelectionFilter( aCollector, EXCLUDE_LOCKED_PADS ); } );
if( selection.Empty() ) if( selection.Empty() )
return 0; return 0;