From 61254ba1b2329ce21d3e47342156e935192f75ba Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Thu, 21 Mar 2024 11:48:56 +0100 Subject: [PATCH] Summary: Set default value true for display of sub nodes Set display of summary nodes to true. This will ensure that the display of vectors in "Data Sources" for a single summary case will be updated when a calculated curve is added or removed. --- .../ProjectDataModel/Summary/RimSummaryCase.cpp | 16 ++-------------- .../ProjectDataModel/Summary/RimSummaryCase.h | 1 - .../Summary/RimSummaryCaseCollection.cpp | 2 +- 3 files changed, 3 insertions(+), 16 deletions(-) diff --git a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryCase.cpp b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryCase.cpp index 0f89af928b..1ba6917fa4 100644 --- a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryCase.cpp +++ b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryCase.cpp @@ -18,31 +18,19 @@ #include "RimSummaryCase.h" -#include "RiaFilePathTools.h" -#include "RiaSummaryTools.h" +#include "RiaEnsembleNameTools.h" #include "RicfCommandObject.h" #include "RifSummaryReaderInterface.h" -#include "RifEclipseSummaryAddress.h" - -#include "RimMainPlotCollection.h" #include "RimProject.h" -#include "RimSummaryAddress.h" #include "RimSummaryAddressCollection.h" -#include "RimSummaryCalculationCollection.h" #include "RimSummaryCaseCollection.h" #include "cafPdmFieldScriptingCapability.h" #include "cafPdmUiCheckBoxEditor.h" #include "cafPdmUiTreeOrdering.h" -#include "cvfAssert.h" - -#include "RiaEnsembleNameTools.h" -#include -#include - CAF_PDM_ABSTRACT_SOURCE_INIT( RimSummaryCase, "SummaryCase" ); //-------------------------------------------------------------------------------------------------- @@ -56,7 +44,7 @@ RimSummaryCase::RimSummaryCase() CAF_PDM_InitScriptableFieldNoDefault( &m_displayName, "ShortName", "Display Name" ); CAF_PDM_InitScriptableFieldNoDefault( &m_displayNameOption, "NameSetting", "Name Setting" ); - CAF_PDM_InitScriptableField( &m_showSubNodesInTree, "ShowSubNodesInTree", false, "Show Summary Data Sub-Tree" ); + CAF_PDM_InitScriptableField( &m_showSubNodesInTree, "ShowSubNodesInTree", true, "Show Summary Data Sub-Tree" ); caf::PdmUiNativeCheckBoxEditor::configureFieldForEditor( &m_showSubNodesInTree ); CAF_PDM_InitScriptableField( &m_useAutoShortName_OBSOLETE, "AutoShortyName", false, "Use Auto Display Name" ); diff --git a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryCase.h b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryCase.h index d305e9d73c..7c6f36a3c3 100644 --- a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryCase.h +++ b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryCase.h @@ -23,7 +23,6 @@ #include "RimCaseDisplayNameTools.h" #include "cafFilePath.h" -#include "cafPdmChildArrayField.h" #include "cafPdmChildField.h" #include "cafPdmField.h" #include "cafPdmObject.h" diff --git a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryCaseCollection.cpp b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryCaseCollection.cpp index 8ee523d659..21fc2c4738 100644 --- a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryCaseCollection.cpp +++ b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryCaseCollection.cpp @@ -171,7 +171,7 @@ void RimSummaryCaseCollection::addCase( RimSummaryCase* summaryCase ) { summaryCase->nameChanged.connect( this, &RimSummaryCaseCollection::onCaseNameChanged ); - if ( m_cases.empty() ) summaryCase->setShowRealizationDataSource( true ); + summaryCase->setShowRealizationDataSource( m_cases.empty() ); m_cases.push_back( summaryCase ); m_cachedSortedEnsembleParameters.clear();