bugfix: modules are not selectable in the high contrast mode (GAL).
This commit is contained in:
parent
3f8c091092
commit
03a17a284b
|
@ -832,8 +832,23 @@ void MODULE::ViewUpdate( int aUpdateFlags )
|
|||
|
||||
void MODULE::ViewGetLayers( int aLayers[], int& aCount ) const
|
||||
{
|
||||
aCount = 1;
|
||||
aCount = 2;
|
||||
aLayers[0] = ITEM_GAL_LAYER( ANCHOR_VISIBLE );
|
||||
|
||||
switch( m_Layer )
|
||||
{
|
||||
case F_Cu:
|
||||
aLayers[1] = ITEM_GAL_LAYER( MOD_FR_VISIBLE );
|
||||
break;
|
||||
|
||||
case B_Cu:
|
||||
aLayers[1] = ITEM_GAL_LAYER( MOD_BK_VISIBLE );
|
||||
break;
|
||||
|
||||
default:
|
||||
assert( false ); // do you really have modules placed on inner layers?
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -269,11 +269,13 @@ void PCB_DRAW_PANEL_GAL::SetHighContrastLayer( LAYER_ID aLayer )
|
|||
if( aLayer == B_Cu )
|
||||
{
|
||||
rSettings->SetActiveLayer( ITEM_GAL_LAYER( PAD_BK_VISIBLE ) );
|
||||
rSettings->SetActiveLayer( ITEM_GAL_LAYER( MOD_BK_VISIBLE ) );
|
||||
rSettings->SetActiveLayer( NETNAMES_GAL_LAYER( PAD_BK_NETNAMES_VISIBLE ) );
|
||||
}
|
||||
else if( aLayer == F_Cu )
|
||||
{
|
||||
rSettings->SetActiveLayer( ITEM_GAL_LAYER( PAD_FR_VISIBLE ) );
|
||||
rSettings->SetActiveLayer( ITEM_GAL_LAYER( MOD_FR_VISIBLE ) );
|
||||
rSettings->SetActiveLayer( NETNAMES_GAL_LAYER( PAD_FR_NETNAMES_VISIBLE ) );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -588,13 +588,13 @@ bool SELECTION_TOOL::selectable( const BOARD_ITEM* aItem ) const
|
|||
int layers[KIGFX::VIEW::VIEW_MAX_LAYERS], layers_count;
|
||||
|
||||
// Filter out items that do not belong to active layers
|
||||
std::set<unsigned int> activeLayers = getView()->GetPainter()->
|
||||
const std::set<unsigned int>& activeLayers = getView()->GetPainter()->
|
||||
GetSettings()->GetActiveLayers();
|
||||
aItem->ViewGetLayers( layers, layers_count );
|
||||
|
||||
for( int i = 0; i < layers_count; ++i )
|
||||
{
|
||||
if( activeLayers.count( layers[i] ) > 0 ) // Item is on at least one of active layers
|
||||
if( activeLayers.count( layers[i] ) > 0 ) // Item is on at least one of the active layers
|
||||
{
|
||||
onActive = true;
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue