Summary: Keep curves in other ensembles unchanged when highlighting a realization

This commit is contained in:
Magne Sjaastad committed 2026-04-20 10:52:02 +02:00
1 parent c66d29e6ea
commit 4dfe238fef
3 files changed
+27 -8

No files matched your search

@@ -1098,9 +1098,9 @@ void RiuQwtPlotWidget::replot()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuQwtPlotWidget::highlightCurvesUpdateOrder( const std::vector<RimPlotCurve*>& curves )
void RiuQwtPlotWidget::highlightCurvesUpdateOrder( const std::vector<RimPlotCurve*>& curves, const std::vector<RimPlotCurve*>& curvesInScope )
{
highlightPlotCurves( curves );
highlightPlotCurves( curves, curvesInScope );
updateCurveOrder();
}
@@ -1108,7 +1108,7 @@ void RiuQwtPlotWidget::highlightCurvesUpdateOrder( const std::vector<RimPlotCurv
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuQwtPlotWidget::highlightPlotCurves( const std::vector<RimPlotCurve*>& curves )
void RiuQwtPlotWidget::highlightPlotCurves( const std::vector<RimPlotCurve*>& curves, const std::vector<RimPlotCurve*>& curvesInScope )
{
if ( !m_plotDefinition || !m_plotDefinition->isCurveHighlightSupported() )
{
@@ -1128,6 +1128,12 @@ void RiuQwtPlotWidget::highlightPlotCurves( const std::vector<RimPlotCurve*>& cu
// manipulation
if ( !currentRimPlotCurve ) continue;
// When a scope is provided, only curves inside the scope are processed. Curves outside the scope are left untouched.
if ( !curvesInScope.empty() && std::find( curvesInScope.begin(), curvesInScope.end(), currentRimPlotCurve ) == curvesInScope.end() )
{
continue;
}
auto* plotCurve = dynamic_cast<QwtPlotCurve*>( plotItem );
if ( plotCurve )
{