diff --git a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryEnsembleTools.cpp b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryEnsembleTools.cpp index e1a107334a..49142e9525 100644 --- a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryEnsembleTools.cpp +++ b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryEnsembleTools.cpp @@ -335,6 +335,17 @@ size_t RimSummaryEnsembleTools::calculateEnsembleParametersIntersectionHash( con return commonAddressCount; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RimSummaryEnsembleTools::isEnsembleCurve( RimPlotCurve* sourceCurve ) +{ + auto summaryCurve = dynamic_cast( sourceCurve ); + if ( !summaryCurve ) return false; + + return summaryCurve->isEnsembleCurve(); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryEnsembleTools.h b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryEnsembleTools.h index 37843a6a8f..5974b668b4 100644 --- a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryEnsembleTools.h +++ b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryEnsembleTools.h @@ -38,6 +38,7 @@ std::vector createVariationSortedEnsembleParameters( const size_t calculateEnsembleParametersIntersectionHash( const std::vector& summaryCases ); +bool isEnsembleCurve( RimPlotCurve* sourceCurve ); void highlightCurvesForSameRealization( RimPlotCurve* sourceCurve ); void resetHighlightAllPlots(); diff --git a/ApplicationLibCode/UserInterface/RiuQwtPlotWidget.cpp b/ApplicationLibCode/UserInterface/RiuQwtPlotWidget.cpp index fed3552ddd..203b17c0dd 100644 --- a/ApplicationLibCode/UserInterface/RiuQwtPlotWidget.cpp +++ b/ApplicationLibCode/UserInterface/RiuQwtPlotWidget.cpp @@ -935,9 +935,19 @@ void RiuQwtPlotWidget::selectClosestPlotItem( const QPoint& pos, bool toggleItem { bool updateCurveOrder = false; resetPlotItemHighlighting( updateCurveOrder ); - if ( auto curve = dynamic_cast( closestItem ) ) + + auto curve = dynamic_cast( closestItem ); + if ( curve && curve->ownerRimCurve() ) { - RimSummaryEnsembleTools::highlightCurvesForSameRealization( curve->ownerRimCurve() ); + const auto rimCurve = curve->ownerRimCurve(); + if ( RimSummaryEnsembleTools::isEnsembleCurve( rimCurve ) ) + { + RimSummaryEnsembleTools::highlightCurvesForSameRealization( rimCurve ); + } + else + { + highlightCurvesUpdateOrder( { rimCurve } ); + } } else { diff --git a/ResInsightVersion.cmake b/ResInsightVersion.cmake index c583e6e99d..7b43ec3f79 100644 --- a/ResInsightVersion.cmake +++ b/ResInsightVersion.cmake @@ -5,7 +5,7 @@ set(RESINSIGHT_PATCH_VERSION 0) # Opional text with no restrictions #set(RESINSIGHT_VERSION_TEXT "-dev") -set(RESINSIGHT_VERSION_TEXT "-RC_1") +set(RESINSIGHT_VERSION_TEXT "-RC_2") # Optional text # Must be unique and increasing within one combination of major/minor/patch version