Don't allow panel to overwrite values set in Spice Model editor.
Fixes: lp:1766920 * https://bugs.launchpad.net/kicad/+bug/1766920
This commit is contained in:
parent
6ccc8577ad
commit
5e5e80d392
|
@ -351,7 +351,7 @@ void DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::EditSpiceModel( wxCommandEvent& event )
|
||||||
if( dialog.ShowModal() != wxID_OK )
|
if( dialog.ShowModal() != wxID_OK )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Transfert sch fields to the m_FieldsBuf fields buffer dialog:
|
// Transfer sch fields to the m_FieldsBuf fields buffer dialog:
|
||||||
m_FieldsBuf.clear();
|
m_FieldsBuf.clear();
|
||||||
|
|
||||||
for( unsigned ii = 0; ii < schfields.size(); ii++ )
|
for( unsigned ii = 0; ii < schfields.size(); ii++ )
|
||||||
|
@ -361,6 +361,9 @@ void DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::EditSpiceModel( wxCommandEvent& event )
|
||||||
m_FieldsBuf.push_back( libfield );
|
m_FieldsBuf.push_back( libfield );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ... and to the panel:
|
||||||
|
copySelectedFieldToPanel();
|
||||||
|
|
||||||
updateDisplay();
|
updateDisplay();
|
||||||
#endif /* KICAD_SPICE */
|
#endif /* KICAD_SPICE */
|
||||||
}
|
}
|
||||||
|
|
|
@ -1031,7 +1031,11 @@ LIB_PIN* SCH_COMPONENT::GetPin( const wxString& number )
|
||||||
|
|
||||||
void SCH_COMPONENT::GetPins( std::vector<LIB_PIN*>& aPinsList )
|
void SCH_COMPONENT::GetPins( std::vector<LIB_PIN*>& aPinsList )
|
||||||
{
|
{
|
||||||
if( PART_SPTR part = m_part.lock() )
|
if( m_part.expired() )
|
||||||
|
{
|
||||||
|
// no pins; nothing to get
|
||||||
|
}
|
||||||
|
else if( PART_SPTR part = m_part.lock() )
|
||||||
{
|
{
|
||||||
part->GetPins( aPinsList, m_unit, m_convert );
|
part->GetPins( aPinsList, m_unit, m_convert );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue