#1923 Add no-plot-update versions of update methods in curve system. onLoadDataAndUpdate is improved for summary curve but not always called with the "no update" flag set

This commit is contained in:
Jacob Støren
2017-09-23 08:47:04 +02:00
parent f9b26ce104
commit 0bb47cba88
38 changed files with 233 additions and 110 deletions

View File

@@ -65,23 +65,37 @@ bool RimSummaryCurveCollection::isCurvesVisible()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimSummaryCurveCollection::loadDataAndUpdate()
void RimSummaryCurveCollection::loadDataAndUpdate(bool updateParentPlot)
{
for (RimSummaryCurve* curve : m_curves)
{
curve->loadDataAndUpdate();
curve->loadDataAndUpdate(false);
}
if ( updateParentPlot )
{
RimSummaryPlot* parentPlot;
firstAncestorOrThisOfTypeAsserted(parentPlot);
if ( parentPlot->qwtPlot() )
{
parentPlot->qwtPlot()->updateLegend();
parentPlot->updateAxes();
parentPlot->updateZoomInQwt();
}
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimSummaryCurveCollection::setParentQwtPlot(QwtPlot* plot)
void RimSummaryCurveCollection::setParentQwtPlotAndReplot(QwtPlot* plot)
{
for (RimSummaryCurve* curve : m_curves)
{
curve->setParentQwtPlot(plot);
curve->setParentQwtPlotNoReplot(plot);
}
if (plot) plot->replot();
}
//--------------------------------------------------------------------------------------------------
@@ -189,9 +203,13 @@ void RimSummaryCurveCollection::updateCaseNameHasChanged()
{
for (RimSummaryCurve* curve : m_curves)
{
curve->updateCurveName();
curve->updateCurveNameNoLegendUpdate();
curve->updateConnectedEditors();
}
RimSummaryPlot* parentPlot;
firstAncestorOrThisOfTypeAsserted(parentPlot);
if (parentPlot->qwtPlot()) parentPlot->qwtPlot()->updateLegend();
}
//--------------------------------------------------------------------------------------------------