mirror of
https://github.com/OPM/ResInsight.git
synced 2024-12-29 10:21:54 -06:00
Fix curve highlight for non-ensemble curves
This commit is contained in:
parent
39d19c9826
commit
996a10f781
@ -335,6 +335,17 @@ size_t RimSummaryEnsembleTools::calculateEnsembleParametersIntersectionHash( con
|
|||||||
return commonAddressCount;
|
return commonAddressCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
bool RimSummaryEnsembleTools::isEnsembleCurve( RimPlotCurve* sourceCurve )
|
||||||
|
{
|
||||||
|
auto summaryCurve = dynamic_cast<RimSummaryCurve*>( sourceCurve );
|
||||||
|
if ( !summaryCurve ) return false;
|
||||||
|
|
||||||
|
return summaryCurve->isEnsembleCurve();
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -38,6 +38,7 @@ std::vector<RigEnsembleParameter> createVariationSortedEnsembleParameters( const
|
|||||||
|
|
||||||
size_t calculateEnsembleParametersIntersectionHash( const std::vector<RimSummaryCase*>& summaryCases );
|
size_t calculateEnsembleParametersIntersectionHash( const std::vector<RimSummaryCase*>& summaryCases );
|
||||||
|
|
||||||
|
bool isEnsembleCurve( RimPlotCurve* sourceCurve );
|
||||||
void highlightCurvesForSameRealization( RimPlotCurve* sourceCurve );
|
void highlightCurvesForSameRealization( RimPlotCurve* sourceCurve );
|
||||||
void resetHighlightAllPlots();
|
void resetHighlightAllPlots();
|
||||||
|
|
||||||
|
@ -935,9 +935,19 @@ void RiuQwtPlotWidget::selectClosestPlotItem( const QPoint& pos, bool toggleItem
|
|||||||
{
|
{
|
||||||
bool updateCurveOrder = false;
|
bool updateCurveOrder = false;
|
||||||
resetPlotItemHighlighting( updateCurveOrder );
|
resetPlotItemHighlighting( updateCurveOrder );
|
||||||
if ( auto curve = dynamic_cast<RiuPlotCurve*>( closestItem ) )
|
|
||||||
|
auto curve = dynamic_cast<RiuPlotCurve*>( 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
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user