Don't select items on inactive layers in high-contrast mode.
Fixes: lp:1833870 * https://bugs.launchpad.net/kicad/+bug/1833870
This commit is contained in:
parent
15cd13ba6e
commit
da645c5d16
|
@ -657,7 +657,10 @@ EDA_ITEM* GERBVIEW_SELECTION_TOOL::disambiguationMenu( GERBER_COLLECTOR* aCollec
|
||||||
|
|
||||||
bool GERBVIEW_SELECTION_TOOL::selectable( const EDA_ITEM* aItem ) const
|
bool GERBVIEW_SELECTION_TOOL::selectable( const EDA_ITEM* aItem ) const
|
||||||
{
|
{
|
||||||
auto item = static_cast<const GERBER_DRAW_ITEM*>( aItem );
|
GERBVIEW_FRAME* frame = getEditFrame<GERBVIEW_FRAME>();
|
||||||
|
const GERBER_DRAW_ITEM* item = static_cast<const GERBER_DRAW_ITEM*>( aItem );
|
||||||
|
int layer = item->GetLayer();
|
||||||
|
|
||||||
|
|
||||||
if( item->GetLayerPolarity() )
|
if( item->GetLayerPolarity() )
|
||||||
{
|
{
|
||||||
|
@ -667,7 +670,11 @@ bool GERBVIEW_SELECTION_TOOL::selectable( const EDA_ITEM* aItem ) const
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return getEditFrame<GERBVIEW_FRAME>()->IsLayerVisible( item->GetLayer() );
|
// We do not want to select items that are in the background
|
||||||
|
if( frame->m_DisplayOptions.m_HighContrastMode && layer != frame->GetActiveLayer() )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return frame->IsLayerVisible( layer );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue