From 9585ab14f9f638ae8402692577c25a002b4a8320 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 | 2 -- .../Summary/RimSummaryCaseCollection.cpp | 2 +- 3 files changed, 3 insertions(+), 17 deletions(-) diff --git a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryCase.cpp b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryCase.cpp index 0f89af928b8..1ba6917fa4d 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 d305e9d73c0..bdaefdff857 100644 --- a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryCase.h +++ b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryCase.h @@ -23,9 +23,7 @@ #include "RimCaseDisplayNameTools.h" #include "cafFilePath.h" -#include "cafPdmChildArrayField.h" #include "cafPdmChildField.h" -#include "cafPdmField.h" #include "cafPdmObject.h" #include diff --git a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryCaseCollection.cpp b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryCaseCollection.cpp index 8ee523d6594..21fc2c47382 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();