mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-04-11 16:10:10 +00:00
Make sure to fully repaint pads when loading a board
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19896
This commit is contained in:
parent
8b541f03e9
commit
547a063981
@ -1511,11 +1511,11 @@ void PCB_EDIT_FRAME::SetGridColor( const COLOR4D& aColor )
|
||||
}
|
||||
|
||||
|
||||
void PCB_EDIT_FRAME::SetActiveLayer( PCB_LAYER_ID aLayer )
|
||||
void PCB_EDIT_FRAME::SetActiveLayer( PCB_LAYER_ID aLayer, bool aForceRedraw )
|
||||
{
|
||||
const PCB_LAYER_ID oldLayer = GetActiveLayer();
|
||||
|
||||
if( oldLayer == aLayer )
|
||||
if( oldLayer == aLayer && !aForceRedraw )
|
||||
return;
|
||||
|
||||
PCB_BASE_FRAME::SetActiveLayer( aLayer );
|
||||
@ -1534,7 +1534,7 @@ void PCB_EDIT_FRAME::SetActiveLayer( PCB_LAYER_ID aLayer )
|
||||
*
|
||||
* For pads/vias, this is to avoid clutter when there are pad/via layers
|
||||
* that vary in flash (i.e. clearance from the hole or pad edge), padstack
|
||||
* shape on eahc layer or clearances on each layer.
|
||||
* shape on each layer or clearances on each layer.
|
||||
*
|
||||
* For tracks, this follows the same logic as pads/vias, but in theory could
|
||||
* have their own set of independent clearance layers to allow track clearance
|
||||
@ -1656,7 +1656,9 @@ void PCB_EDIT_FRAME::onBoardLoaded()
|
||||
m_appearancePanel->ApplyLayerPreset( localSettings.m_ActiveLayerPreset );
|
||||
|
||||
if( GetBoard()->GetDesignSettings().IsLayerEnabled( localSettings.m_ActiveLayer ) )
|
||||
SetActiveLayer( localSettings.m_ActiveLayer );
|
||||
SetActiveLayer( localSettings.m_ActiveLayer, true );
|
||||
else
|
||||
SetActiveLayer( GetActiveLayer(), true ); // Make sure to repaint even if not switching
|
||||
|
||||
PROJECT_FILE& projectFile = Prj().GetProjectFile();
|
||||
|
||||
|
@ -270,7 +270,17 @@ public:
|
||||
/**
|
||||
* Change the currently active layer to \a aLayer and also update the #APPEARANCE_CONTROLS.
|
||||
*/
|
||||
void SetActiveLayer( PCB_LAYER_ID aLayer ) override;
|
||||
void SetActiveLayer( PCB_LAYER_ID aLayer ) override
|
||||
{
|
||||
SetActiveLayer( aLayer, false );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param aLayer is the layer to set active
|
||||
* @param aForceRedraw will repaint things that depend on layer switch even if the new active
|
||||
* layer is the same as the previous one
|
||||
*/
|
||||
void SetActiveLayer( PCB_LAYER_ID aLayer, bool aForceRedraw );
|
||||
|
||||
void OnDisplayOptionsChanged() override;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user