Avoid overwrite of axis object for newer project file versions

Add project file version check to the usage of m_plotAxis_OBSOLETE in RimSummaryCurve::initAfterRead()
This commit is contained in:
Magne Sjaastad committed 2025-08-07 13:45:08 +02:00
1 parent 43fa4197c7
commit b0a86de653
2 files changed
+6 -3

No files matched your search

@@ -45,6 +45,9 @@ bool isCandidateNewerThanOther( int candidateMajorVersion,
return ( candidateMajorVersion > otherMajorVersion );
}
// Early exit if a minor number is undefined
if ( candidateMinorVersion == -1 || otherMinorVersion == -1 ) return false;
if ( candidateMinorVersion != otherMinorVersion )
{
return ( candidateMinorVersion > otherMinorVersion );
@@ -102,7 +105,7 @@ QString stringOfDigits( const QString& string )
bool RiaProjectFileTools::isCandidateVersionNewerThanOther( const QString& candidateProjectFileVersion, const QString& projectFileVersion )
{
int candidateMajorVersion = 0;
int candidateMinorVersion = 0;
int candidateMinorVersion = -1;
int candidatePatchNumber = -1;
int candidateDevelopmentId = -1;
@@ -113,7 +116,7 @@ bool RiaProjectFileTools::isCandidateVersionNewerThanOther( const QString& candi
&candidateDevelopmentId );
int majorVersion = 0;
int minorVersion = 0;
int minorVersion = -1;
int patchNumber = -1;
int developmentId = -1;