diff --git a/eeschema/sim/sim_property.cpp b/eeschema/sim/sim_property.cpp index 005e5f4e67..f25ac484a4 100644 --- a/eeschema/sim/sim_property.cpp +++ b/eeschema/sim/sim_property.cpp @@ -408,7 +408,9 @@ SIM_ENUM_PROPERTY::SIM_ENUM_PROPERTY( const wxString& aLabel, const wxString& aN { auto it = std::find( GetParam().info.enumValues.begin(), GetParam().info.enumValues.end(), GetParam().value->ToString() ); - SetValue( std::distance( GetParam().info.enumValues.begin(), it ) ); + + // we need the force cast for msvc because wxVariant lacks 64-bit methods due to `long` + SetValue( static_cast( std::distance( GetParam().info.enumValues.begin(), it ) ) ); }