#2769 Ensemble curves. Fix crash when clicking on ensemble curve

This commit is contained in:
Bjørn Erik Jensen
2018-04-20 12:30:59 +02:00
parent b4fae86aea
commit 68b360a03f
5 changed files with 52 additions and 19 deletions

View File

@@ -1520,7 +1520,7 @@ void RimSummaryPlot::detachAllCurves()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
caf::PdmObject* RimSummaryPlot::findRimCurveFromQwtCurve(const QwtPlotCurve* qwtCurve) const
caf::PdmObject* RimSummaryPlot::findRimPlotObjectFromQwtCurve(const QwtPlotCurve* qwtCurve) const
{
for (RimGridTimeHistoryCurve* curve : m_gridTimeHistoryCurves)
{
@@ -1550,6 +1550,17 @@ caf::PdmObject* RimSummaryPlot::findRimCurveFromQwtCurve(const QwtPlotCurve* qwt
}
}
if (m_ensembleCurveSetCollection)
{
RimEnsembleCurveSet* foundCurveSet = m_ensembleCurveSetCollection->findRimCurveSetFromQwtCurve(qwtCurve);
if (foundCurveSet)
{
m_ensembleCurveSetCollection->setCurrentSummaryCurveSet(foundCurveSet);
return foundCurveSet;
}
}
return nullptr;
}