mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-15 10:43:15 +02:00
SynchronizeProperties after (potentially) changing text vars.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19658
This commit is contained in:
parent
6eaeacfe79
commit
0d6a2f1c47
@ -946,6 +946,9 @@ void PCB_BASE_FRAME::CommonSettingsChanged( bool aEnvVarsChanged, bool aTextVars
|
|||||||
settings->LoadDisplayOptions( GetDisplayOptions() );
|
settings->LoadDisplayOptions( GetDisplayOptions() );
|
||||||
settings->m_ForceShowFieldsWhenFPSelected = GetPcbNewSettings()->m_Display.m_ForceShowFieldsWhenFPSelected;
|
settings->m_ForceShowFieldsWhenFPSelected = GetPcbNewSettings()->m_Display.m_ForceShowFieldsWhenFPSelected;
|
||||||
|
|
||||||
|
if( aTextVarsChanged )
|
||||||
|
GetBoard()->SynchronizeProperties();
|
||||||
|
|
||||||
// Note: KIGFX::REPAINT isn't enough for things that go from invisible to visible as
|
// Note: KIGFX::REPAINT isn't enough for things that go from invisible to visible as
|
||||||
// they won't be found in the view layer's itemset for re-painting.
|
// they won't be found in the view layer's itemset for re-painting.
|
||||||
GetCanvas()->GetView()->UpdateAllItemsConditionally(
|
GetCanvas()->GetView()->UpdateAllItemsConditionally(
|
||||||
@ -963,6 +966,15 @@ void PCB_BASE_FRAME::CommonSettingsChanged( bool aEnvVarsChanged, bool aTextVars
|
|||||||
{
|
{
|
||||||
return KIGFX::REPAINT; // pad clearance display
|
return KIGFX::REPAINT; // pad clearance display
|
||||||
}
|
}
|
||||||
|
else if( EDA_TEXT* text = dynamic_cast<EDA_TEXT*>( aItem ) )
|
||||||
|
{
|
||||||
|
if( text->HasTextVars() )
|
||||||
|
{
|
||||||
|
text->ClearRenderCache();
|
||||||
|
text->ClearBoundingBoxCache();
|
||||||
|
return KIGFX::GEOMETRY | KIGFX::REPAINT;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
} );
|
} );
|
||||||
|
@ -1387,13 +1387,14 @@ void PCB_EDIT_FRAME::ShowBoardSetupDialog( const wxString& aInitialPage )
|
|||||||
flags |= KIGFX::REPAINT;
|
flags |= KIGFX::REPAINT;
|
||||||
}
|
}
|
||||||
|
|
||||||
EDA_TEXT* text = dynamic_cast<EDA_TEXT*>( aItem );
|
if( EDA_TEXT* text = dynamic_cast<EDA_TEXT*>( aItem ) )
|
||||||
|
|
||||||
if( text && text->HasTextVars() )
|
|
||||||
{
|
{
|
||||||
text->ClearRenderCache();
|
if( text->HasTextVars() )
|
||||||
text->ClearBoundingBoxCache();
|
{
|
||||||
flags |= KIGFX::GEOMETRY | KIGFX::REPAINT;
|
text->ClearRenderCache();
|
||||||
|
text->ClearBoundingBoxCache();
|
||||||
|
flags |= KIGFX::GEOMETRY | KIGFX::REPAINT;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return flags;
|
return flags;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user