Make selected background layers translucent

We can't render them underneath other objects, but we can at least
make it possible to see other objects through them.
This commit is contained in:
Jon Evans 2023-02-16 17:52:04 -05:00
parent bd4758e4df
commit fc68b8d71a
2 changed files with 7 additions and 1 deletions

View File

@ -477,6 +477,13 @@ COLOR4D SCH_PAINTER::getRenderColor( const EDA_ITEM *aItem, int aLayer, bool aDr
if( aDrawingShadows )
color = m_schSettings.GetLayerColor( LAYER_SELECTION_SHADOWS );
}
else if( aItem->IsSelected()
&& ( aLayer == LAYER_DEVICE_BACKGROUND || aLayer == LAYER_SHEET_BACKGROUND ) )
{
// Selected items will be painted over all other items, so make backgrounds translucent so
// that non-selected overlapping objects are visible
color = color.WithAlpha( 0.5 );
}
if( m_schSettings.m_ShowDisabled
|| ( m_schSettings.m_ShowGraphicsDisabled && aItem->Type() != LIB_FIELD_T ) )

View File

@ -1564,7 +1564,6 @@ void SCH_MOVE_TOOL::moveItem( EDA_ITEM* aItem, const VECTOR2I& aDelta )
break;
}
getView()->Hide( aItem, false );
aItem->SetFlags( IS_MOVING );
}