Add SIM_ENABLE_FIELD column name when excluding symbol from simulation
Fixes #13691
This commit is contained in:
parent
971abcfc1a
commit
413169782a
|
@ -246,7 +246,7 @@ void DIALOG_LIB_SYMBOL_PROPERTIES::OnExcludeFromSimulation( wxCommandEvent& even
|
||||||
if( simEnableFieldRow == -1 )
|
if( simEnableFieldRow == -1 )
|
||||||
{
|
{
|
||||||
simEnableFieldRow = (int) m_fields->size();
|
simEnableFieldRow = (int) m_fields->size();
|
||||||
m_fields->emplace_back( m_libEntry, simEnableFieldRow );
|
m_fields->emplace_back( m_libEntry, simEnableFieldRow, SIM_ENABLE_FIELD );
|
||||||
|
|
||||||
// notify the grid
|
// notify the grid
|
||||||
wxGridTableMessage msg( m_fields, wxGRIDTABLE_NOTIFY_ROWS_APPENDED, 1 );
|
wxGridTableMessage msg( m_fields, wxGRIDTABLE_NOTIFY_ROWS_APPENDED, 1 );
|
||||||
|
@ -254,6 +254,8 @@ void DIALOG_LIB_SYMBOL_PROPERTIES::OnExcludeFromSimulation( wxCommandEvent& even
|
||||||
}
|
}
|
||||||
|
|
||||||
m_grid->SetCellValue( simEnableFieldRow, FDC_VALUE, wxT( "0" ) );
|
m_grid->SetCellValue( simEnableFieldRow, FDC_VALUE, wxT( "0" ) );
|
||||||
|
m_grid->SetCellValue( simEnableFieldRow, FDC_SHOWN, wxT( "0" ) );
|
||||||
|
m_grid->SetCellValue( simEnableFieldRow, FDC_SHOW_NAME, wxT( "0" ) );
|
||||||
}
|
}
|
||||||
else if( simEnableFieldRow >= 0 )
|
else if( simEnableFieldRow >= 0 )
|
||||||
{
|
{
|
||||||
|
@ -889,6 +891,21 @@ void DIALOG_LIB_SYMBOL_PROPERTIES::OnUpdateUI( wxUpdateUIEvent& event )
|
||||||
m_delayedFocusRow = -1;
|
m_delayedFocusRow = -1;
|
||||||
m_delayedFocusColumn = -1;
|
m_delayedFocusColumn = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef KICAD_SPICE
|
||||||
|
wxString simEnable;
|
||||||
|
|
||||||
|
for( int ii = MANDATORY_FIELDS; ii < m_fields->GetNumberRows(); ++ii )
|
||||||
|
{
|
||||||
|
if( m_fields->GetValue( ii, FDC_NAME ) == SIM_ENABLE_FIELD )
|
||||||
|
{
|
||||||
|
simEnable = m_fields->GetValue( ii, FDC_VALUE );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
m_excludeFromSim->SetValue( simEnable == wxS( "0" ) );
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -562,6 +562,8 @@ void DIALOG_SYMBOL_PROPERTIES::OnExcludeFromSimulation( wxCommandEvent& event )
|
||||||
}
|
}
|
||||||
|
|
||||||
m_fieldsGrid->SetCellValue( simEnableFieldRow, FDC_VALUE, wxT( "0" ) );
|
m_fieldsGrid->SetCellValue( simEnableFieldRow, FDC_VALUE, wxT( "0" ) );
|
||||||
|
m_fieldsGrid->SetCellValue( simEnableFieldRow, FDC_SHOWN, wxT( "0" ) );
|
||||||
|
m_fieldsGrid->SetCellValue( simEnableFieldRow, FDC_SHOW_NAME, wxT( "0" ) );
|
||||||
}
|
}
|
||||||
else if( simEnableFieldRow >= 0 )
|
else if( simEnableFieldRow >= 0 )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue