Keep sim-enabled checkbox in sync with edits to fields grid.

This commit is contained in:
Jeff Young 2023-01-06 19:06:53 +00:00
parent 411669ab88
commit 5bdc3a5721
1 changed files with 15 additions and 0 deletions

View File

@ -1171,6 +1171,21 @@ void DIALOG_SYMBOL_PROPERTIES::OnUpdateUI( wxUpdateUIEvent& event )
if( !m_fieldsGrid->IsCellEditControlShown() )
AdjustFieldsGridColumns();
}
#ifdef KICAD_SPICE
wxString simEnable;
for( int ii = MANDATORY_FIELDS; ii < m_fieldsGrid->GetNumberRows(); ++ii )
{
if( m_fieldsGrid->GetCellValue( ii, FDC_NAME ) == SIM_ENABLE_FIELD )
{
simEnable = m_fieldsGrid->GetCellValue( ii, FDC_VALUE );
break;
}
}
m_cbExcludeFromSim->SetValue( simEnable == "0" );
#endif
}