pcbnew: Allow capture of non-highlighted items

When routing in high-contrast mode, the user may wish to place items
that are primarily on a different layer while remaining in high contrast
mode.  This fixes a regression from 4.0.7

Fixes: lp:1804309
* https://bugs.launchpad.net/kicad/+bug/1804309
This commit is contained in:
Seth Hillbrand 2019-01-07 23:35:43 -08:00
parent 90ad240660
commit a8b3a3cc61
2 changed files with 5 additions and 4 deletions

View File

@ -453,7 +453,7 @@ SELECTION& SELECTION_TOOL::RequestSelection( CLIENT_SELECTION_FILTER aClientFilt
}
void SELECTION_TOOL::toggleSelection( BOARD_ITEM* aItem )
void SELECTION_TOOL::toggleSelection( BOARD_ITEM* aItem, bool aForce )
{
if( aItem->IsSelected() )
{
@ -468,7 +468,7 @@ void SELECTION_TOOL::toggleSelection( BOARD_ITEM* aItem )
clearSelection();
// Prevent selection of invisible or inactive items
if( selectable( aItem ) )
if( aForce || selectable( aItem ) )
{
select( aItem );
@ -1271,7 +1271,7 @@ int SELECTION_TOOL::findMove( const TOOL_EVENT& aEvent )
{
KIGFX::VIEW_CONTROLS* viewCtrls = getViewControls();
clearSelection();
toggleSelection( module );
toggleSelection( module, true );
auto cursorPosition = viewCtrls->GetCursorPosition( false );

View File

@ -266,8 +266,9 @@ private:
* Changes selection status of a given item.
*
* @param aItem is the item to have selection status changed.
* @param aForce causes the toggle to happen without checking selectability
*/
void toggleSelection( BOARD_ITEM* aItem );
void toggleSelection( BOARD_ITEM* aItem, bool aForce = false );
/**
* Function selectable()