Library Editor: fixed a bug when multiple components were shown as active
This commit is contained in:
parent
ba4515885b
commit
d900e89382
|
@ -255,6 +255,14 @@ public:
|
||||||
m_currentPart = aPart;
|
m_currentPart = aPart;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the current library and part name as LIB_ID.
|
||||||
|
*/
|
||||||
|
LIB_ID GetCurrentLibId() const
|
||||||
|
{
|
||||||
|
return LIB_ID( m_currentLib, m_currentPart );
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
///> Parent frame
|
///> Parent frame
|
||||||
LIB_EDIT_FRAME& m_frame;
|
LIB_EDIT_FRAME& m_frame;
|
||||||
|
|
|
@ -247,7 +247,7 @@ bool LIB_MANAGER_ADAPTER::GetAttr( wxDataViewItem const& aItem, unsigned int aCo
|
||||||
aAttr.SetItalic( !node->IsRoot );
|
aAttr.SetItalic( !node->IsRoot );
|
||||||
|
|
||||||
// mark current library with inverted colors
|
// mark current library with inverted colors
|
||||||
if( node->Name == m_libMgr->GetCurrentPart() )
|
if( node->LibId == m_libMgr->GetCurrentLibId() )
|
||||||
{
|
{
|
||||||
aAttr.SetColour( wxSystemSettings::GetColour( wxSYS_COLOUR_HIGHLIGHT ) );
|
aAttr.SetColour( wxSystemSettings::GetColour( wxSYS_COLOUR_HIGHLIGHT ) );
|
||||||
aAttr.SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_HIGHLIGHTTEXT ) );
|
aAttr.SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_HIGHLIGHTTEXT ) );
|
||||||
|
|
Loading…
Reference in New Issue