Check known m_Desc field before m_Fields.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16971
(cherry picked from commit 25291d6e3a
)
This commit is contained in:
parent
ca3cd706e5
commit
2cd9fbab9d
|
@ -674,10 +674,10 @@ void LIB_TREE_MODEL_ADAPTER::GetValue( wxVariant& aVariant,
|
||||||
{
|
{
|
||||||
const wxString& key = m_colIdxMap.at( aCol );
|
const wxString& key = m_colIdxMap.at( aCol );
|
||||||
|
|
||||||
if( node->m_Fields.count( key ) )
|
if( key == wxT( "Description" ) )
|
||||||
valueStr = UnescapeString( node->m_Fields.at( key ) );
|
|
||||||
else if( key == wxT( "Description" ) )
|
|
||||||
valueStr = UnescapeString( node->m_Desc );
|
valueStr = UnescapeString( node->m_Desc );
|
||||||
|
else if( node->m_Fields.count( key ) )
|
||||||
|
valueStr = UnescapeString( node->m_Fields.at( key ) );
|
||||||
else
|
else
|
||||||
valueStr = wxEmptyString;
|
valueStr = wxEmptyString;
|
||||||
}
|
}
|
||||||
|
|
|
@ -282,10 +282,10 @@ void SYMBOL_TREE_SYNCHRONIZING_ADAPTER::GetValue( wxVariant& aVariant, wxDataVie
|
||||||
|
|
||||||
wxString valueStr;
|
wxString valueStr;
|
||||||
|
|
||||||
if( node->m_Fields.count( key ) )
|
if( key == wxT( "Description" ) )
|
||||||
valueStr = node->m_Fields.at( key );
|
|
||||||
else if( key == wxT( "Description" ) )
|
|
||||||
valueStr = node->m_Desc;
|
valueStr = node->m_Desc;
|
||||||
|
else if( node->m_Fields.count( key ) )
|
||||||
|
valueStr = node->m_Fields.at( key );
|
||||||
else
|
else
|
||||||
valueStr = wxEmptyString;
|
valueStr = wxEmptyString;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue