Commit 19e4cb40 authored by jean-pierre charras's avatar jean-pierre charras

Viewlib: ensure in wxListBoxes the lib and the component are always shown as...

Viewlib: ensure in wxListBoxes  the lib and the component are always shown as selected when a lib and component are specified (when called by the get component dialog for instance)
parent 992cc5f1
...@@ -59,11 +59,6 @@ void RotateListOfItems( PICKED_ITEMS_LIST& aItemsList, wxPoint& rotationPoint ) ...@@ -59,11 +59,6 @@ void RotateListOfItems( PICKED_ITEMS_LIST& aItemsList, wxPoint& rotationPoint )
} }
void DeleteItemsInList( EDA_DRAW_PANEL* panel, PICKED_ITEMS_LIST& aItemsList );
void DuplicateItemsInList( SCH_SCREEN* screen, PICKED_ITEMS_LIST& aItemsList,
const wxPoint aMoveVector );
void MirrorY( PICKED_ITEMS_LIST& aItemsList, wxPoint& aMirrorPoint ) void MirrorY( PICKED_ITEMS_LIST& aItemsList, wxPoint& aMirrorPoint )
{ {
for( unsigned ii = 0; ii < aItemsList.GetCount(); ii++ ) for( unsigned ii = 0; ii < aItemsList.GetCount(); ii++ )
......
...@@ -416,6 +416,10 @@ void LIB_VIEW_FRAME::SetSelectedLibrary( const wxString& aLibraryName ) ...@@ -416,6 +416,10 @@ void LIB_VIEW_FRAME::SetSelectedLibrary( const wxString& aLibraryName )
m_canvas->Refresh(); m_canvas->Refresh();
DisplayLibInfos(); DisplayLibInfos();
ReCreateHToolbar(); ReCreateHToolbar();
// Ensure the corresponding line in m_libList is selected
// (which is not necessary the case if SetSelectedLibrary is called
// by an other caller than ClickOnLibList.
m_libList->SetStringSelection( m_libraryName, true );
} }
...@@ -435,6 +439,10 @@ void LIB_VIEW_FRAME::SetSelectedComponent( const wxString& aComponentName ) ...@@ -435,6 +439,10 @@ void LIB_VIEW_FRAME::SetSelectedComponent( const wxString& aComponentName )
if( m_entryName.CmpNoCase( aComponentName ) != 0 ) if( m_entryName.CmpNoCase( aComponentName ) != 0 )
{ {
m_entryName = aComponentName; m_entryName = aComponentName;
// Ensure the corresponding line in m_cmpList is selected
// (which is not necessary the case if SetSelectedComponent is called
// by an other caller than ClickOnCmpList.
m_cmpList->SetStringSelection( aComponentName, true );
DisplayLibInfos(); DisplayLibInfos();
m_unit = 1; m_unit = 1;
m_convert = 1; m_convert = 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment