Fix incorrect usage of a UTF8 char in a C string in code.
Using a UTF8 char inside a C string can work on unix, but not on Windows. It must be explicitly converted in a unicode value inside a wide string (like a wxString)
This commit is contained in:
parent
0ae3d0216a
commit
021eb2f3a8
|
@ -336,6 +336,16 @@ protected:
|
||||||
unsigned int aCol,
|
unsigned int aCol,
|
||||||
wxDataViewItemAttr& aAttr ) const override;
|
wxDataViewItemAttr& aAttr ) const override;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return a unicode string to mark a node name like
|
||||||
|
* a pinned library name
|
||||||
|
* This is not an ascii7 char, but a unicode char
|
||||||
|
*/
|
||||||
|
const wxString GetPinningSymbol() const
|
||||||
|
{
|
||||||
|
return wxString::FromUTF8( "☆ " );
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
EDA_BASE_FRAME* m_parent;
|
EDA_BASE_FRAME* m_parent;
|
||||||
|
|
||||||
|
|
|
@ -216,7 +216,7 @@ void SYMBOL_TREE_SYNCHRONIZING_ADAPTER::GetValue( wxVariant& aVariant, wxDataVie
|
||||||
aVariant = node->m_Name;
|
aVariant = node->m_Name;
|
||||||
|
|
||||||
if( node->m_Pinned )
|
if( node->m_Pinned )
|
||||||
aVariant = "☆ " + node->m_Name;
|
aVariant = GetPinningSymbol() + node->m_Name;
|
||||||
|
|
||||||
// mark modified libs with an asterisk
|
// mark modified libs with an asterisk
|
||||||
if( node->m_Type == LIB_TREE_NODE::LIB && m_libMgr->IsLibraryModified( node->m_Name ) )
|
if( node->m_Type == LIB_TREE_NODE::LIB && m_libMgr->IsLibraryModified( node->m_Name ) )
|
||||||
|
|
|
@ -184,7 +184,7 @@ void FP_TREE_SYNCHRONIZING_ADAPTER::GetValue( wxVariant& aVariant, wxDataViewIte
|
||||||
aVariant = currentFPName;
|
aVariant = currentFPName;
|
||||||
}
|
}
|
||||||
else if( node->m_Pinned )
|
else if( node->m_Pinned )
|
||||||
aVariant = "☆ " + node->m_Name;
|
aVariant = GetPinningSymbol() + node->m_Name;
|
||||||
else
|
else
|
||||||
aVariant = node->m_Name;
|
aVariant = node->m_Name;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue