From 8fb4901d4ba5e387e86c98a6a941d63904d07c59 Mon Sep 17 00:00:00 2001 From: Marek Roszko Date: Fri, 12 Apr 2024 22:51:52 -0400 Subject: [PATCH] Fix more utf8 comparisons --- eeschema/symbol_tree_synchronizing_adapter.cpp | 2 +- pcbnew/fp_tree_synchronizing_adapter.cpp | 2 +- pcbnew/pcb_edit_frame.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eeschema/symbol_tree_synchronizing_adapter.cpp b/eeschema/symbol_tree_synchronizing_adapter.cpp index 99d19af2ac..acc59921ab 100644 --- a/eeschema/symbol_tree_synchronizing_adapter.cpp +++ b/eeschema/symbol_tree_synchronizing_adapter.cpp @@ -174,7 +174,7 @@ void SYMBOL_TREE_SYNCHRONIZING_ADAPTER::updateLibrary( LIB_TREE_NODE_LIBRARY& aL auto aliasIt = std::find_if( aliases.begin(), aliases.end(), [&] ( const LIB_SYMBOL* a ) { - return a->GetName() == (*nodeIt)->m_LibId.GetLibItemName(); + return a->GetName() == (*nodeIt)->m_LibId.GetLibItemName().wx_str(); } ); if( aliasIt != aliases.end() ) diff --git a/pcbnew/fp_tree_synchronizing_adapter.cpp b/pcbnew/fp_tree_synchronizing_adapter.cpp index f91f34396c..aff00b5f4d 100644 --- a/pcbnew/fp_tree_synchronizing_adapter.cpp +++ b/pcbnew/fp_tree_synchronizing_adapter.cpp @@ -278,7 +278,7 @@ bool FP_TREE_SYNCHRONIZING_ADAPTER::GetAttr( wxDataViewItem const& aItem, unsign switch( node->m_Type ) { case LIB_TREE_NODE::LIBRARY: - if( node->m_Name == m_frame->GetLoadedFPID().GetLibNickname() ) + if( node->m_Name == m_frame->GetLoadedFPID().GetLibNickname().wx_str() ) { // mark the current library if it's collapsed if( !m_widget->IsExpanded( ToItem( node ) ) ) diff --git a/pcbnew/pcb_edit_frame.cpp b/pcbnew/pcb_edit_frame.cpp index b94ae7064e..cf72f730b6 100644 --- a/pcbnew/pcb_edit_frame.cpp +++ b/pcbnew/pcb_edit_frame.cpp @@ -2349,7 +2349,7 @@ void PCB_EDIT_FRAME::ExchangeFootprint( FOOTPRINT* aExisting, FOOTPRINT* aNew, processTextItem( aExisting->Value(), aNew->Value(), // reset value text only when it is a proxy for the footprint ID // (cf replacing value "MountingHole-2.5mm" with "MountingHole-4.0mm") - aExisting->GetValue() == aExisting->GetFPID().GetLibItemName(), + aExisting->GetValue() == aExisting->GetFPID().GetLibItemName().wx_str(), resetTextLayers, resetTextEffects, aUpdated ); // Copy fields in accordance with the reset* flags