Drawing improvements for symbol & footprint diffs.

Moves forced-transparency setting down into VIEW_ITEM so that it can
be used to place forced-transparent objects in a different target.
This keeps EnableDepthTest() from equalizing the alpha values between
the two symbols (or two footprints).
This commit is contained in:
Jeff Young
2023-03-11 12:45:16 +00:00
parent 4737e3b8a7
commit c9351dfd67
9 changed files with 58 additions and 31 deletions
+4 -4
View File
@@ -131,12 +131,12 @@ void SYMBOL_DIFF_WIDGET::onSlider( wxScrollEvent& aEvent )
else
val = ( pct - 0.5 ) * 2;
m_previewItem->SetForceTransparency( val );
m_previewItem->SetForcedTransparency( val );
view->Update( m_previewItem );
for( LIB_ITEM& child : m_previewItem->GetDrawItems() )
{
child.SetForceTransparency( val );
child.SetForcedTransparency( val );
view->Update( &child );
}
}
@@ -150,12 +150,12 @@ void SYMBOL_DIFF_WIDGET::onSlider( wxScrollEvent& aEvent )
else
val = 1.0 - ( pct * 2 );
m_libraryItem->SetForceTransparency( val );
m_libraryItem->SetForcedTransparency( val );
view->Update( m_libraryItem );
for( LIB_ITEM& child : m_libraryItem->GetDrawItems() )
{
child.SetForceTransparency( val );
child.SetForcedTransparency( val );
view->Update( &child );
}
}