Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix curve highlight for non-ensemble curves #11968

Merged
merged 2 commits into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,17 @@ size_t RimSummaryEnsembleTools::calculateEnsembleParametersIntersectionHash( con
return commonAddressCount;
}

//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RimSummaryEnsembleTools::isEnsembleCurve( RimPlotCurve* sourceCurve )
{
auto summaryCurve = dynamic_cast<RimSummaryCurve*>( sourceCurve );
if ( !summaryCurve ) return false;

return summaryCurve->isEnsembleCurve();
}

//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ std::vector<RigEnsembleParameter> createVariationSortedEnsembleParameters( const

size_t calculateEnsembleParametersIntersectionHash( const std::vector<RimSummaryCase*>& summaryCases );

bool isEnsembleCurve( RimPlotCurve* sourceCurve );
void highlightCurvesForSameRealization( RimPlotCurve* sourceCurve );
void resetHighlightAllPlots();

Expand Down
14 changes: 12 additions & 2 deletions ApplicationLibCode/UserInterface/RiuQwtPlotWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -935,9 +935,19 @@ void RiuQwtPlotWidget::selectClosestPlotItem( const QPoint& pos, bool toggleItem
{
bool updateCurveOrder = false;
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
{
Expand Down
2 changes: 1 addition & 1 deletion ResInsightVersion.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading