#2975 Ensemble Curve Set: Add compound update function updateAll()

This commit is contained in:
Magne Sjaastad
2018-06-01 15:37:47 +02:00
parent 8dbfd5f878
commit ea7c5b6a76
5 changed files with 26 additions and 15 deletions

View File

@@ -200,6 +200,13 @@ void RimEnsembleCurveSet::loadDataAndUpdate(bool updateParentPlot)
m_yValuesUiFilterResultSelection = m_yValuesCurveVariable->address(); m_yValuesUiFilterResultSelection = m_yValuesCurveVariable->address();
updateAllCurves(); updateAllCurves();
if (updateParentPlot)
{
RimSummaryPlot* parentPlot;
firstAncestorOrThisOfTypeAsserted(parentPlot);
parentPlot->updateAll();
}
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------

View File

@@ -75,20 +75,14 @@ void RimEnsembleCurveSetCollection::loadDataAndUpdate(bool updateParentPlot)
{ {
for (RimEnsembleCurveSet* curveSet : m_curveSets) for (RimEnsembleCurveSet* curveSet : m_curveSets)
{ {
curveSet->loadDataAndUpdate(updateParentPlot); curveSet->loadDataAndUpdate(false);
} }
if (updateParentPlot) if (updateParentPlot)
{ {
RimSummaryPlot* parentPlot; RimSummaryPlot* parentPlot;
firstAncestorOrThisOfTypeAsserted(parentPlot); firstAncestorOrThisOfTypeAsserted(parentPlot);
if (parentPlot->qwtPlot()) parentPlot->updateAll();
{
parentPlot->updatePlotTitle();
parentPlot->qwtPlot()->updateLegend();
parentPlot->updateAxes();
parentPlot->updateZoomInQwt();
}
} }
} }

View File

@@ -105,13 +105,7 @@ void RimSummaryCurveCollection::loadDataAndUpdate(bool updateParentPlot)
{ {
RimSummaryPlot* parentPlot; RimSummaryPlot* parentPlot;
firstAncestorOrThisOfTypeAsserted(parentPlot); firstAncestorOrThisOfTypeAsserted(parentPlot);
if ( parentPlot->qwtPlot() ) parentPlot->updateAll();
{
parentPlot->updatePlotTitle();
parentPlot->qwtPlot()->updateLegend();
parentPlot->updateAxes();
parentPlot->updateZoomInQwt();
}
} }
} }

View File

@@ -573,6 +573,20 @@ void RimSummaryPlot::copyAxisPropertiesFromOther(const RimSummaryPlot& sourceSum
} }
} }
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimSummaryPlot::updateAll()
{
if (qwtPlot())
{
updatePlotTitle();
qwtPlot()->updateLegend();
updateAxes();
updateZoomInQwt();
}
}
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------

View File

@@ -118,6 +118,8 @@ public:
void copyAxisPropertiesFromOther(const RimSummaryPlot& sourceSummaryPlot); void copyAxisPropertiesFromOther(const RimSummaryPlot& sourceSummaryPlot);
void updateAll();
// RimViewWindow overrides // RimViewWindow overrides
public: public:
virtual QWidget* createViewWidget(QWidget* mainWindowParent) override; virtual QWidget* createViewWidget(QWidget* mainWindowParent) override;