We want to save invariant numbers also

If the number is invariant, save it below, don't prematurely exit

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21544
This commit is contained in:
Seth Hillbrand 2025-08-24 16:15:32 -07:00
parent 5442e5050e
commit 626e9d9d1b

View File

@ -435,10 +435,9 @@ void DIALOG_SHIM::SaveControlState()
if( !key.empty() ) if( !key.empty() )
{ {
if( m_unitBinders.contains( win ) ) if( m_unitBinders.contains( win ) && !m_unitBinders[ win ]->UnitsInvariant() )
{ {
if( !m_unitBinders[ win ]->UnitsInvariant() ) dlgMap[ key ] = m_unitBinders[ win ]->GetValue();
dlgMap[ key ] = m_unitBinders[ win ]->GetValue();
} }
else if( wxComboBox* combo = dynamic_cast<wxComboBox*>( win ) ) else if( wxComboBox* combo = dynamic_cast<wxComboBox*>( win ) )
{ {