#12168 Allow highlight of curves based on selection of realization object

Use the first available highlighted curve as basis for display of horizontal readout value. Fallback to single realization curves.
When selecting a realization in project tree, highlight all related curves
Make sure zoom rect works when readout annotations are active
This commit is contained in:
Magne Sjaastad
2025-02-18 11:04:40 +01:00
committed by GitHub
parent eac1c84ed4
commit bbd79cca6a
15 changed files with 121 additions and 49 deletions

View File

@@ -942,7 +942,7 @@ void RiuQwtPlotWidget::selectClosestPlotItem( const QPoint& pos, bool toggleItem
const auto rimCurve = curve->ownerRimCurve();
if ( RimSummaryEnsembleTools::isEnsembleCurve( rimCurve ) )
{
RimSummaryEnsembleTools::highlightCurvesForSameRealization( rimCurve );
RimSummaryEnsembleTools::highlightCurvesForSameRealizationFromCurve( rimCurve );
}
else
{
@@ -1055,6 +1055,8 @@ void RiuQwtPlotWidget::highlightPlotCurves( const std::set<RimPlotCurve*>& curve
plotCurve->setPen( existingPen );
plotCurve->setZ( zValue + 100.0 );
highlightPlotAxes( plotCurve->xAxis(), plotCurve->yAxis() );
m_hightlightedCurves.push_back( currentRimPlotCurve );
}
else
{
@@ -1110,11 +1112,21 @@ void RiuQwtPlotWidget::resetPlotItemHighlighting( bool doUpdateCurveOrder )
if ( doUpdateCurveOrder ) updateCurveOrder();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::vector<RimPlotCurve*> RiuQwtPlotWidget::highlightedCurves() const
{
return m_hightlightedCurves;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuQwtPlotWidget::resetPlotCurveHighlighting()
{
m_hightlightedCurves.clear();
if ( !m_plotDefinition || m_originalZValues.empty() )
{
return;