Skip to content

Commit

Permalink
#11141 Improve curve and plot title for calculated summary curves
Browse files Browse the repository at this point in the history
Remove obsolete special handling of calculated curves
  • Loading branch information
magnesj committed Feb 2, 2024
1 parent 06766b3 commit 9f4979b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -252,18 +252,6 @@ QString RimSummaryCurveAutoName::buildCurveName( const RifEclipseSummaryAddress&
{
text = summaryAddress.vectorName();
}
else if ( summaryAddress.isCalculated() )
{
// Need to add case name for calculated summary
RimProject* proj = RimProject::current();
RimSummaryCalculationCollection* calcColl = proj->calculationCollection();

RimUserDefinedCalculation* calculation = calcColl->findCalculationById( summaryAddress.id() );
if ( calculation )
{
text = calculation->shortName().toStdString();
}
}

if ( m_unit && !unitText.empty() )
{
Expand All @@ -273,7 +261,7 @@ QString RimSummaryCurveAutoName::buildCurveName( const RifEclipseSummaryAddress&

appendAddressDetails( text, summaryAddress, plotNameHelper );

if ( !caseName.empty() && !summaryAddress.isCalculated() )
if ( !caseName.empty() )
{
bool skipSubString = plotNameHelper && plotNameHelper->isCaseInTitle();

Expand Down
22 changes: 5 additions & 17 deletions ApplicationLibCode/ProjectDataModel/Summary/RimSummaryPlot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2850,24 +2850,12 @@ void RimSummaryPlot::updateNameHelperWithCurveData( RimSummaryPlotNameHelper* na
{
for ( RimSummaryCurve* curve : m_summaryCurveCollection->curves() )
{
if ( curve->summaryAddressY().isCalculated() )
{
std::vector<RifEclipseSummaryAddress> calcAddresses;
RiaSummaryTools::getSummaryCasesAndAddressesForCalculation( curve->summaryAddressY().id(), sumCases, calcAddresses );
for ( const auto& adr : calcAddresses )
{
addresses.emplace_back( adr );
}
}
else
{
addresses.push_back( curve->curveAddress() );
sumCases.push_back( curve->summaryCaseY() );
addresses.push_back( curve->curveAddress() );
sumCases.push_back( curve->summaryCaseY() );

if ( curve->summaryCaseX() )
{
sumCases.push_back( curve->summaryCaseX() );
}
if ( curve->summaryCaseX() )
{
sumCases.push_back( curve->summaryCaseX() );
}
}
}
Expand Down

0 comments on commit 9f4979b

Please sign in to comment.