From fc68b8d71ac4c7e7e88a96db7567d13dd45e8c61 Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Thu, 16 Feb 2023 17:52:04 -0500 Subject: [PATCH] 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. --- eeschema/sch_painter.cpp | 7 +++++++ eeschema/tools/sch_move_tool.cpp | 1 - 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/eeschema/sch_painter.cpp b/eeschema/sch_painter.cpp index bccbb83caf..b9187e9d0e 100644 --- a/eeschema/sch_painter.cpp +++ b/eeschema/sch_painter.cpp @@ -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 ) ) diff --git a/eeschema/tools/sch_move_tool.cpp b/eeschema/tools/sch_move_tool.cpp index 87154369e2..30479b6780 100644 --- a/eeschema/tools/sch_move_tool.cpp +++ b/eeschema/tools/sch_move_tool.cpp @@ -1564,7 +1564,6 @@ void SCH_MOVE_TOOL::moveItem( EDA_ITEM* aItem, const VECTOR2I& aDelta ) break; } - getView()->Hide( aItem, false ); aItem->SetFlags( IS_MOVING ); }