More uniform handling of power symbols and exclude-from-simulation.
This commit is contained in:
parent
9f56b75f01
commit
d64cb7f81b
|
@ -180,6 +180,9 @@ bool DIALOG_LIB_SYMBOL_PROPERTIES::TransferDataToWindow()
|
|||
|
||||
m_OptionPower->SetValue( m_libEntry->IsPower() );
|
||||
|
||||
if( m_libEntry->IsPower() )
|
||||
m_spiceFieldsButton->Hide();
|
||||
|
||||
LIB_FIELD* simEnableField = m_libEntry->FindField( SIM_ENABLE_FIELD );
|
||||
m_excludeFromSim->SetValue( simEnableField && simEnableField->GetText() == wxT( "0" ) );
|
||||
|
||||
|
@ -942,11 +945,13 @@ void DIALOG_LIB_SYMBOL_PROPERTIES::onPowerCheckBox( wxCommandEvent& aEvent )
|
|||
m_excludeFromBoardCheckBox->SetValue( true );
|
||||
m_excludeFromBomCheckBox->Enable( false );
|
||||
m_excludeFromBoardCheckBox->Enable( false );
|
||||
m_spiceFieldsButton->Show( false );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_excludeFromBomCheckBox->Enable( true );
|
||||
m_excludeFromBoardCheckBox->Enable( true );
|
||||
m_spiceFieldsButton->Show( true );
|
||||
}
|
||||
|
||||
OnModify();
|
||||
|
|
|
@ -353,7 +353,7 @@ DIALOG_LIB_SYMBOL_PROPERTIES_BASE::DIALOG_LIB_SYMBOL_PROPERTIES_BASE( wxWindow*
|
|||
bUpperSizer->Add( m_NoteBook, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 );
|
||||
|
||||
|
||||
bMainSizer->Add( bUpperSizer, 1, wxEXPAND, 5 );
|
||||
bMainSizer->Add( bUpperSizer, 1, wxEXPAND|wxBOTTOM, 5 );
|
||||
|
||||
wxBoxSizer* bSizer101;
|
||||
bSizer101 = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
|
|
@ -64,7 +64,7 @@
|
|||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="flag">wxEXPAND|wxBOTTOM</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
|
|
|
@ -355,6 +355,9 @@ DIALOG_SYMBOL_PROPERTIES::DIALOG_SYMBOL_PROPERTIES( SCH_EDIT_FRAME* aParent,
|
|||
m_pinGrid->SetTable( m_dataModel );
|
||||
}
|
||||
|
||||
if( m_part && m_part->IsPower() )
|
||||
m_spiceFieldsButton->Hide();
|
||||
|
||||
m_pinGrid->PushEventHandler( new GRID_TRICKS( m_pinGrid ) );
|
||||
m_pinGrid->SetSelectionMode( wxGrid::wxGridSelectRows );
|
||||
|
||||
|
|
|
@ -1031,10 +1031,9 @@ int ERC_TESTER::TestSimModelIssues()
|
|||
{
|
||||
SCH_SYMBOL* symbol = static_cast<SCH_SYMBOL*>( item );
|
||||
|
||||
// Power symbols are skipped: obviously they do not have a simulator model
|
||||
const std::unique_ptr< LIB_SYMBOL >& libpart = symbol->GetLibSymbolRef();
|
||||
|
||||
if( libpart && libpart->IsPower() )
|
||||
// Power symbols and other symbols which have the reference starting with "#" are
|
||||
// not included in simulation
|
||||
if( symbol->GetRef( &sheet ).StartsWith( '#' ) || symbol->GetExcludeFromSim() )
|
||||
continue;
|
||||
|
||||
// Reset for each symbol
|
||||
|
|
|
@ -1366,6 +1366,11 @@ void SCH_EDIT_FRAME::RefreshOperatingPointDisplay()
|
|||
wxString ref = symbol->GetRef( &GetCurrentSheet() );
|
||||
std::vector<SCH_PIN*> pins = symbol->GetPins( &GetCurrentSheet() );
|
||||
|
||||
// Power symbols and other symbols which have the reference starting with "#" are
|
||||
// not included in simulation
|
||||
if( ref.StartsWith( '#' ) || symbol->GetExcludeFromSim() )
|
||||
continue;
|
||||
|
||||
for( SCH_PIN* pin : pins )
|
||||
{
|
||||
if( !pin->GetOperatingPoint().IsEmpty() )
|
||||
|
|
Loading…
Reference in New Issue