Make sure old project files loads as before

This commit is contained in:
Magne Sjaastad 2023-03-15 10:38:45 +01:00
parent 27959b9d13
commit 26416c8937
2 changed files with 15 additions and 1 deletions

View File

@ -17,11 +17,12 @@
/////////////////////////////////////////////////////////////////////////////////
#include "RimEnsembleStatistics.h"
#include "RimEnsembleCurveSetInterface.h"
#include "RiaColorTools.h"
#include "RimEnsembleCurveSet.h"
#include "RimEnsembleCurveSetInterface.h"
#include "RimProject.h"
CAF_PDM_SOURCE_INIT( RimEnsembleStatistics, "RimEnsembleStatistics" );
@ -52,6 +53,12 @@ RimEnsembleStatistics::RimEnsembleStatistics( RimEnsembleCurveSetInterface* pare
m_warningLabel.xmlCapability()->disableIO();
m_warningLabel.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::HIDDEN );
m_warningLabel.uiCapability()->setUiReadOnly( true );
if ( RimProject::current() && RimProject::current()->isProjectFileVersionEqualOrOlderThan( "2023.1.0" ) )
{
// Set to always show curves before the version this feature was introduced in
m_showStatisticsCurveLegends = true;
}
}
//--------------------------------------------------------------------------------------------------

View File

@ -59,6 +59,13 @@ RimSummaryCurveAutoName::RimSummaryCurveAutoName()
CAF_PDM_InitField(&m_caseName, "CaseName", true, "Case/Ensemble Name");
// clang-format on
if ( RimProject::current() && RimProject::current()->isProjectFileVersionEqualOrOlderThan( "2023.1.0" ) )
{
// Make sure that behavior in older projects behave as before
m_longVectorName = false;
m_vectorName = true;
}
}
//--------------------------------------------------------------------------------------------------