From 0997ecf446fc232a3db9e49f1cc18dba9f2824df Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Mon, 8 Apr 2019 16:52:27 +0200 Subject: [PATCH] Fix incorrect conversion from wxString to std::string --- kicad/import_project.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/kicad/import_project.cpp b/kicad/import_project.cpp index 8647e6517b..6a8baa0741 100644 --- a/kicad/import_project.cpp +++ b/kicad/import_project.cpp @@ -141,7 +141,8 @@ void KICAD_MANAGER_FRAME::OnImportEagleFiles( wxCommandEvent& event ) } } - std::string packet = wxString::Format( "%d\n%s", SCH_IO_MGR::SCH_EAGLE, sch.GetFullPath() ); + std::string packet = StrPrintf( "%d\n%s", SCH_IO_MGR::SCH_EAGLE, + TO_UTF8( sch.GetFullPath() ) ); schframe->Kiway().ExpressMail( FRAME_SCH, MAIL_IMPORT_FILE, packet, this ); if( !schframe->IsShown() ) // the frame exists, (created by the dialog field editor) @@ -183,7 +184,8 @@ void KICAD_MANAGER_FRAME::OnImportEagleFiles( wxCommandEvent& event ) pcbframe->Show( true ); } - std::string packet = wxString::Format( "%d\n%s", IO_MGR::EAGLE, pcb.GetFullPath() ); + std::string packet = StrPrintf( "%d\n%s", IO_MGR::EAGLE, + TO_UTF8( pcb.GetFullPath() ) ); pcbframe->Kiway().ExpressMail( FRAME_PCB, MAIL_IMPORT_FILE, packet, this ); // On Windows, Raise() does not bring the window on screen, when iconized