diff --git a/ApplicationCode/Commands/SummaryPlotCommands/RicSummaryCurveCreator.cpp b/ApplicationCode/Commands/SummaryPlotCommands/RicSummaryCurveCreator.cpp index 294b820987..03f6e8068c 100644 --- a/ApplicationCode/Commands/SummaryPlotCommands/RicSummaryCurveCreator.cpp +++ b/ApplicationCode/Commands/SummaryPlotCommands/RicSummaryCurveCreator.cpp @@ -32,6 +32,7 @@ #include "RimSummaryCase.h" #include "RimSummaryPlot.h" #include "RimSummaryPlotCollection.h" +#include "RimSummaryCurveCollection.h" #include "RiuMainPlotWindow.h" @@ -247,7 +248,7 @@ void RicSummaryCurveCreator::updateFromSummaryPlot(RimSummaryPlot* targetPlot) loadDataAndUpdatePlot(); } - updateConnectedEditors(); + caf::PdmUiItem::updateConnectedEditors(); } //-------------------------------------------------------------------------------------------------- @@ -912,8 +913,8 @@ void RicSummaryCurveCreator::updatePreviewCurvesFromCurveDefinitions(const std:: } m_previewPlot->loadDataAndUpdate(); - m_previewPlot->updateConnectedEditors(); m_previewPlot->zoomAll(); + updateEditorsConnectedToPreviewPlot(); } //-------------------------------------------------------------------------------------------------- @@ -1046,7 +1047,7 @@ void RicSummaryCurveCreator::populateCurveCreator(const RimSummaryPlot& sourceSu if (sourceCurveDefs.count(curveDef) == 0) curve->setCurveVisiblity(false); } - m_previewPlot->updateConnectedEditors(); + updateEditorsConnectedToPreviewPlot(); } //-------------------------------------------------------------------------------------------------- @@ -1156,3 +1157,9 @@ void RicSummaryCurveCreator::resetAllFields() } } } + +void RicSummaryCurveCreator::updateEditorsConnectedToPreviewPlot() +{ + m_previewPlot->updateConnectedEditors(); + m_previewPlot->summaryCurveCollection()->updateConnectedEditors(); +} diff --git a/ApplicationCode/Commands/SummaryPlotCommands/RicSummaryCurveCreator.h b/ApplicationCode/Commands/SummaryPlotCommands/RicSummaryCurveCreator.h index 91cc68a034..e4d2991817 100644 --- a/ApplicationCode/Commands/SummaryPlotCommands/RicSummaryCurveCreator.h +++ b/ApplicationCode/Commands/SummaryPlotCommands/RicSummaryCurveCreator.h @@ -114,6 +114,7 @@ private: static void copyCurveAndAddToPlot(const RimSummaryCurve *curve, RimSummaryPlot *plot, bool forceVisible = false); void resetAllFields(); + void updateEditorsConnectedToPreviewPlot(); private: caf::PdmPtrArrayField m_selectedCases; diff --git a/ApplicationCode/Commands/SummaryPlotCommands/RicSummaryCurveCreatorSplitterUi.cpp b/ApplicationCode/Commands/SummaryPlotCommands/RicSummaryCurveCreatorSplitterUi.cpp index 98bfceada4..9b3da49a48 100644 --- a/ApplicationCode/Commands/SummaryPlotCommands/RicSummaryCurveCreatorSplitterUi.cpp +++ b/ApplicationCode/Commands/SummaryPlotCommands/RicSummaryCurveCreatorSplitterUi.cpp @@ -32,7 +32,8 @@ #include #include #include - +#include "RimSummaryPlot.h" +#include "RimSummaryCurveCollection.h" //-------------------------------------------------------------------------------------------------- /// @@ -187,7 +188,8 @@ QWidget* RicSummaryCurveCreatorSplitterUi::getOrCreateCurveTreeWidget() RicSummaryCurveCreator* sumCurveCreator = dynamic_cast(this->pdmItem()); if (sumCurveCreator) { - curveTreeView->setPdmItem(sumCurveCreator->previewPlot()); + RimSummaryCurveCollection* sumColl = sumCurveCreator->previewPlot()->summaryCurveCollection(); + curveTreeView->setPdmItem(sumColl); } curveTreeView->treeView()->setHeaderHidden(true); diff --git a/ApplicationCode/ProjectDataModel/Summary/RimSummaryPlot.cpp b/ApplicationCode/ProjectDataModel/Summary/RimSummaryPlot.cpp index c5955d1f18..8dda8a8520 100644 --- a/ApplicationCode/ProjectDataModel/Summary/RimSummaryPlot.cpp +++ b/ApplicationCode/ProjectDataModel/Summary/RimSummaryPlot.cpp @@ -464,6 +464,14 @@ void RimSummaryPlot::deleteAllSummaryCurves() m_summaryCurveCollection->deleteAllCurves(); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimSummaryCurveCollection* RimSummaryPlot::summaryCurveCollection() const +{ + return m_summaryCurveCollection(); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/ProjectDataModel/Summary/RimSummaryPlot.h b/ApplicationCode/ProjectDataModel/Summary/RimSummaryPlot.h index 73e262bc1b..dee31bc009 100644 --- a/ApplicationCode/ProjectDataModel/Summary/RimSummaryPlot.h +++ b/ApplicationCode/ProjectDataModel/Summary/RimSummaryPlot.h @@ -101,7 +101,7 @@ public: std::vector summaryCurves() const; void deleteAllSummaryCurves(); - + RimSummaryCurveCollection* summaryCurveCollection() const; // RimViewWindow overrides public: virtual QWidget* createViewWidget(QWidget* mainWindowParent) override;