Don't double-up FUTURE_FORMAT_ERROR problem strings.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14780
This commit is contained in:
parent
86abfd2cef
commit
e82e4af483
|
@ -120,10 +120,18 @@ FUTURE_FORMAT_ERROR::FUTURE_FORMAT_ERROR( const PARSE_ERROR& aParseError,
|
||||||
const wxString& aRequiredVersion ) :
|
const wxString& aRequiredVersion ) :
|
||||||
PARSE_ERROR()
|
PARSE_ERROR()
|
||||||
{
|
{
|
||||||
init( aRequiredVersion );
|
if( const FUTURE_FORMAT_ERROR* ffe = dynamic_cast<const FUTURE_FORMAT_ERROR*>( &aParseError ) )
|
||||||
|
{
|
||||||
|
requiredVersion = ffe->requiredVersion;
|
||||||
|
problem = ffe->Problem();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
init( aRequiredVersion );
|
||||||
|
|
||||||
if( !aParseError.Problem().IsEmpty() )
|
if( !aParseError.Problem().IsEmpty() )
|
||||||
problem += wxS( "\n\n" ) + _( "Full error text:" ) + wxS( "\n" ) + aParseError.Problem();
|
problem += wxS( "\n\n" ) + _( "Full error text:" ) + wxS( "\n" ) + aParseError.Problem();
|
||||||
|
}
|
||||||
|
|
||||||
lineNumber = aParseError.lineNumber;
|
lineNumber = aParseError.lineNumber;
|
||||||
byteIndex = aParseError.byteIndex;
|
byteIndex = aParseError.byteIndex;
|
||||||
|
|
Loading…
Reference in New Issue