diff --git a/ApplicationCode/Commands/SummaryPlotCommands/RicSummaryCurveCreator.cpp b/ApplicationCode/Commands/SummaryPlotCommands/RicSummaryCurveCreator.cpp index c7b3c09b8a..cf892ba100 100644 --- a/ApplicationCode/Commands/SummaryPlotCommands/RicSummaryCurveCreator.cpp +++ b/ApplicationCode/Commands/SummaryPlotCommands/RicSummaryCurveCreator.cpp @@ -59,6 +59,11 @@ CAF_PDM_SOURCE_INIT(RicSummaryCurveCreator, "RicSummaryCurveCreator"); +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +const QString RicSummaryCurveCreator::CONFIGURATION_NAME = "CurveCreatorCfg"; + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/Commands/SummaryPlotCommands/RicSummaryCurveCreator.h b/ApplicationCode/Commands/SummaryPlotCommands/RicSummaryCurveCreator.h index d80b37e1be..864bb64f63 100644 --- a/ApplicationCode/Commands/SummaryPlotCommands/RicSummaryCurveCreator.h +++ b/ApplicationCode/Commands/SummaryPlotCommands/RicSummaryCurveCreator.h @@ -51,6 +51,9 @@ class RicSummaryCurveCreator : public caf::PdmObject { CAF_PDM_HEADER_INIT; +public: + static const QString CONFIGURATION_NAME; + private: typedef caf::AppEnum AppearanceTypeAppEnum; diff --git a/ApplicationCode/Commands/SummaryPlotCommands/RicSummaryCurveCreatorSplitterUi.cpp b/ApplicationCode/Commands/SummaryPlotCommands/RicSummaryCurveCreatorSplitterUi.cpp index 84401ca1e0..2f63189fd9 100644 --- a/ApplicationCode/Commands/SummaryPlotCommands/RicSummaryCurveCreatorSplitterUi.cpp +++ b/ApplicationCode/Commands/SummaryPlotCommands/RicSummaryCurveCreatorSplitterUi.cpp @@ -19,6 +19,7 @@ #include "RicSummaryCurveCreatorSplitterUi.h" #include "RicSummaryCurveCreator.h" +#include "RimEnsembleCurveSetCollection.h" #include "RimSummaryCurveCollection.h" #include "RimSummaryPlot.h" @@ -194,8 +195,11 @@ QWidget* RicSummaryCurveCreatorSplitterUi::getOrCreateCurveTreeWidget() if (m_summaryCurveCreator) { - RimSummaryCurveCollection* sumColl = m_summaryCurveCreator->previewPlot()->summaryCurveCollection(); - m_curveTreeView->setPdmItem(sumColl); + RimSummaryPlot* previewPlot = m_summaryCurveCreator->previewPlot(); + m_curveTreeView->setPdmItem(previewPlot); + m_curveTreeView->setUiConfigurationName(RicSummaryCurveCreator::CONFIGURATION_NAME); + m_curveTreeView->setExpanded(previewPlot->summaryCurveCollection(), true); + m_curveTreeView->setExpanded(previewPlot->ensembleCurveSetCollection(), true); } return m_curvesPanel; diff --git a/ApplicationCode/ProjectDataModel/Summary/RimSummaryPlot.cpp b/ApplicationCode/ProjectDataModel/Summary/RimSummaryPlot.cpp index ae9f0d4bfd..3f46ecfae3 100644 --- a/ApplicationCode/ProjectDataModel/Summary/RimSummaryPlot.cpp +++ b/ApplicationCode/ProjectDataModel/Summary/RimSummaryPlot.cpp @@ -21,6 +21,8 @@ #include "RiaApplication.h" #include "RiaSummaryCurveAnalyzer.h" +#include "SummaryPlotCommands/RicSummaryCurveCreator.h" + #include "RimAsciiDataCurve.h" #include "RimEnsembleCurveSet.h" #include "RimGridTimeHistoryCurve.h" @@ -1186,26 +1188,37 @@ QImage RimSummaryPlot::snapshotWindowContent() //-------------------------------------------------------------------------------------------------- void RimSummaryPlot::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName /*= ""*/) { - caf::PdmUiTreeOrdering* axisFolder = uiTreeOrdering.add("Axes", ":/Axes16x16.png"); - - if (m_isCrossPlot) + if (uiConfigName == RicSummaryCurveCreator::CONFIGURATION_NAME) { - axisFolder->add(&m_bottomAxisProperties); + uiTreeOrdering.add(&m_summaryCurveCollection); + if (!m_isCrossPlot && !m_ensembleCurveSetCollection->curveSets().empty()) + { + uiTreeOrdering.add(&m_ensembleCurveSetCollection); + } } else { - axisFolder->add(&m_timeAxisProperties); - } - axisFolder->add(&m_leftYAxisProperties); - axisFolder->add(&m_rightYAxisProperties); + caf::PdmUiTreeOrdering* axisFolder = uiTreeOrdering.add("Axes", ":/Axes16x16.png"); - uiTreeOrdering.add(&m_summaryCurveCollection); - if (!m_isCrossPlot && !m_ensembleCurveSetCollection->curveSets().empty()) - { - uiTreeOrdering.add(&m_ensembleCurveSetCollection); + if (m_isCrossPlot) + { + axisFolder->add(&m_bottomAxisProperties); + } + else + { + axisFolder->add(&m_timeAxisProperties); + } + axisFolder->add(&m_leftYAxisProperties); + axisFolder->add(&m_rightYAxisProperties); + + uiTreeOrdering.add(&m_summaryCurveCollection); + if (!m_isCrossPlot && !m_ensembleCurveSetCollection->curveSets().empty()) + { + uiTreeOrdering.add(&m_ensembleCurveSetCollection); + } + uiTreeOrdering.add(&m_gridTimeHistoryCurves); + uiTreeOrdering.add(&m_asciiDataCurves); } - uiTreeOrdering.add(&m_gridTimeHistoryCurves); - uiTreeOrdering.add(&m_asciiDataCurves); uiTreeOrdering.skipRemainingChildren(true); }