mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#11141 Improve curve and plot title for calculated summary curves
Remove obsolete special handling of calculated curves
This commit is contained in:
@@ -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() )
|
||||
{
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user