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

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
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -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 )
{
    for( unsigned ii = 0; ii < aItemsList.GetCount(); ii++ )
+8 −0
Original line number Diff line number Diff line
@@ -416,6 +416,10 @@ void LIB_VIEW_FRAME::SetSelectedLibrary( const wxString& aLibraryName )
    m_canvas->Refresh();
    DisplayLibInfos();
    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 )
    if( m_entryName.CmpNoCase( aComponentName ) != 0 )
    {
        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();
        m_unit    = 1;
        m_convert = 1;