From 095f02e6effac50c2ac4bf9906b7a5d0edbc7baa Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Mon, 7 Nov 2022 14:45:51 +0000 Subject: [PATCH] Fix encoding issues in Simulation Model dialog's property grid. --- common/properties/pg_properties.cpp | 2 +- eeschema/dialogs/dialog_sim_model.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/common/properties/pg_properties.cpp b/common/properties/pg_properties.cpp index 03b02385c0..4e9c3c65ce 100644 --- a/common/properties/pg_properties.cpp +++ b/common/properties/pg_properties.cpp @@ -101,7 +101,7 @@ wxPGProperty* PGPropertyFactory( const PROPERTY_BASE* aProperty ) else if( typeId == TYPE_HASH( bool ) ) { ret = new wxBoolProperty(); - ret->SetAttribute( wxT( "UseCheckbox" ), true ); + ret->SetAttribute( wxPG_BOOL_USE_CHECKBOX, true ); } else if( typeId == TYPE_HASH( wxString ) ) { diff --git a/eeschema/dialogs/dialog_sim_model.cpp b/eeschema/dialogs/dialog_sim_model.cpp index 6c0857ddbe..3c65d5ecd8 100644 --- a/eeschema/dialogs/dialog_sim_model.cpp +++ b/eeschema/dialogs/dialog_sim_model.cpp @@ -812,13 +812,13 @@ wxPGProperty* DIALOG_SIM_MODEL::newParamProperty( int aParamIndex ) const break; } - prop->SetAttribute( wxPG_ATTR_UNITS, param.info.unit ); + prop->SetAttribute( wxPG_ATTR_UNITS, wxString::FromUTF8( param.info.unit.c_str() ) ); // Legacy due to the way we extracted the parameters from Ngspice. if( param.isOtherVariant ) - prop->SetCell( 3, wxString( param.info.defaultValueOfOtherVariant ) ); + prop->SetCell( 3, wxString::FromUTF8( param.info.defaultValueOfOtherVariant ) ); else - prop->SetCell( 3, wxString( param.info.defaultValue ) ); + prop->SetCell( 3, wxString::FromUTF8( param.info.defaultValue ) ); wxString typeStr;