Commit fb784323 authored by Maciej Suminski's avatar Maciej Suminski

Made pads & module texts unselectable

parent f4de2877
...@@ -220,13 +220,10 @@ void SELECTION_TOOL::selectSingle( const VECTOR2I& aWhere ) ...@@ -220,13 +220,10 @@ void SELECTION_TOOL::selectSingle( const VECTOR2I& aWhere )
break; break;
default: default:
// Remove modules, they have to be selected by clicking on area that does not // Remove unselectable items
// contain anything but module footprint and not selectable items
for( int i = collector.GetCount() - 1; i >= 0 ; --i ) for( int i = collector.GetCount() - 1; i >= 0 ; --i )
{ {
BOARD_ITEM* boardItem = collector[i]; if( !selectable( collector[i] ) )
if( boardItem->Type() == PCB_MODULE_T || !selectable( boardItem ) )
collector.Remove( i ); collector.Remove( i );
} }
...@@ -455,12 +452,6 @@ bool SELECTION_TOOL::selectable( const BOARD_ITEM* aItem ) const ...@@ -455,12 +452,6 @@ bool SELECTION_TOOL::selectable( const BOARD_ITEM* aItem ) const
} }
break; break;
case PCB_PAD_T:
// Pads are not selectable in multiple selection mode
if( m_multiple )
return false;
/* no break */
case PCB_MODULE_T: case PCB_MODULE_T:
if( aItem->IsOnLayer( LAYER_N_FRONT ) && board->IsElementVisible( MOD_FR_VISIBLE ) ) if( aItem->IsOnLayer( LAYER_N_FRONT ) && board->IsElementVisible( MOD_FR_VISIBLE ) )
return true; return true;
...@@ -472,16 +463,10 @@ bool SELECTION_TOOL::selectable( const BOARD_ITEM* aItem ) const ...@@ -472,16 +463,10 @@ bool SELECTION_TOOL::selectable( const BOARD_ITEM* aItem ) const
break; break;
case PCB_MODULE_TEXT_T: // These are not selectable
// Module texts are not selectable in multiple selection mode
if( m_multiple )
return false;
break;
// These are not selectable, otherwise silkscreen drawings would be easily destroyed
case PCB_MODULE_EDGE_T: case PCB_MODULE_EDGE_T:
// and some other stuff that should not be selected case PCB_MODULE_TEXT_T:
case PCB_PAD_T:
case NOT_USED: case NOT_USED:
case TYPE_NOT_INIT: case TYPE_NOT_INIT:
return false; return false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment