try to fix a wx3.0/wx3.1 compatibility

This commit is contained in:
jean-pierre charras 2022-11-07 20:26:36 +01:00
parent b5f62da5d9
commit 05336798ac
1 changed files with 14 additions and 7 deletions

View File

@ -816,10 +816,17 @@ wxPGProperty* DIALOG_SIM_MODEL<T>::newParamProperty( int aParamIndex ) const
prop->SetAttribute( wxPG_ATTR_UNITS, wxString::FromUTF8( param.info.unit.c_str() ) ); prop->SetAttribute( wxPG_ATTR_UNITS, wxString::FromUTF8( param.info.unit.c_str() ) );
// Legacy due to the way we extracted the parameters from Ngspice. // Legacy due to the way we extracted the parameters from Ngspice.
if( param.isOtherVariant ) #if wxCHECK_VERSION( 3, 1, 0 )
prop->SetCell( 3, wxString::FromUTF8( param.info.defaultValueOfOtherVariant ) ); if( param.isOtherVariant )
else prop->SetCell( 3, wxString::FromUTF8( param.info.defaultValueOfOtherVariant ) );
prop->SetCell( 3, wxString::FromUTF8( param.info.defaultValue ) ); else
prop->SetCell( 3, wxString::FromUTF8( param.info.defaultValue ) );
#else
if( param.isOtherVariant )
prop->SetCell( 3, wxString::FromUTF8( param.info.defaultValueOfOtherVariant.c_str() ) );
else
prop->SetCell( 3, wxString::FromUTF8( param.info.defaultValue.c_str() ) );
#endif
wxString typeStr; wxString typeStr;