Make CvPcb correctly preview the selected component footprint if one has already been assigned.
This commit is contained in:
parent
95891006cd
commit
6767a0b2a3
5
TODO.txt
5
TODO.txt
|
@ -26,11 +26,6 @@ Common
|
||||||
but is now in scripts/python/ky temporarily.
|
but is now in scripts/python/ky temporarily.
|
||||||
|
|
||||||
|
|
||||||
CvPCB
|
|
||||||
-----
|
|
||||||
* Preview of the already assigned footprint.
|
|
||||||
|
|
||||||
|
|
||||||
EESchema
|
EESchema
|
||||||
--------
|
--------
|
||||||
* Drag and drop between two EESchema windows.
|
* Drag and drop between two EESchema windows.
|
||||||
|
|
|
@ -525,6 +525,25 @@ void CVPCB_MAINFRAME::OnSelectComponent( wxListEvent& event )
|
||||||
}
|
}
|
||||||
|
|
||||||
m_FootprintList->SetFootprintFilteredList( &m_components[ selection ], m_footprints );
|
m_FootprintList->SetFootprintFilteredList( &m_components[ selection ], m_footprints );
|
||||||
|
|
||||||
|
// Preview of the already assigned footprint.
|
||||||
|
// Find the footprint that was already choosen for this component and select it.
|
||||||
|
wxString module = *(&m_components[ selection ].m_Module);
|
||||||
|
|
||||||
|
for( int ii = 0; ii < m_FootprintList->GetCount(); ii++ )
|
||||||
|
{
|
||||||
|
wxString footprintName;
|
||||||
|
wxString msg = (*m_FootprintList->m_ActiveFootprintList)[ii];
|
||||||
|
msg.Trim( true );
|
||||||
|
msg.Trim( false );
|
||||||
|
footprintName = msg.AfterFirst( wxChar( ' ' ) );
|
||||||
|
|
||||||
|
if( module.Cmp( footprintName ) == 0 )
|
||||||
|
m_FootprintList->SetSelection( ii, true );
|
||||||
|
else
|
||||||
|
m_FootprintList->SetSelection( ii, false );
|
||||||
|
}
|
||||||
|
|
||||||
SendMessageToEESCHEMA();
|
SendMessageToEESCHEMA();
|
||||||
DisplayStatus();
|
DisplayStatus();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue