mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Improve auto name for curves and plots
- use vector name as plot title if a vector and the associated history vector is present - use short vector name as fallback for curve name - use Plot N as fallback name for sub plot
This commit is contained in:
parent
36dab01cf5
commit
5e53f5687d
@ -93,6 +93,11 @@ std::string RiaSummaryAddressAnalyzer::quantityNameForTitle() const
|
|||||||
return *quantities().begin();
|
return *quantities().begin();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( quantities().size() == 2 && quantityNamesWithHistory().size() == 1 )
|
||||||
|
{
|
||||||
|
return *quantityNamesWithHistory().begin();
|
||||||
|
}
|
||||||
|
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -243,6 +243,8 @@ QString RimSummaryCurveAutoName::buildCurveName( const RifEclipseSummaryAddress&
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( text.empty() ) text = summaryAddress.vectorName();
|
||||||
|
|
||||||
return QString::fromStdString( text );
|
return QString::fromStdString( text );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -563,6 +563,17 @@ void RimSummaryPlot::updatePlotTitle()
|
|||||||
m_description = m_nameHelperAllCurves->plotTitle();
|
m_description = m_nameHelperAllCurves->plotTitle();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( m_description().isEmpty() )
|
||||||
|
{
|
||||||
|
RimMultiPlot* plotWindow = nullptr;
|
||||||
|
firstAncestorOrThisOfType( plotWindow );
|
||||||
|
|
||||||
|
auto index = plotWindow->plotIndex( this );
|
||||||
|
|
||||||
|
QString title = QString( "Sub Plot %1" ).arg( index + 1 );
|
||||||
|
m_fallbackPlotName = title;
|
||||||
|
}
|
||||||
|
|
||||||
updateCurveNames();
|
updateCurveNames();
|
||||||
updateMdiWindowTitle();
|
updateMdiWindowTitle();
|
||||||
|
|
||||||
@ -2529,10 +2540,6 @@ void RimSummaryPlot::updateCurveNames()
|
|||||||
{
|
{
|
||||||
curveSet->updateEnsembleLegendItem();
|
curveSet->updateEnsembleLegendItem();
|
||||||
}
|
}
|
||||||
|
|
||||||
RimSummaryPlotNameHelper nameHelper;
|
|
||||||
updateNameHelperWithCurveData( &nameHelper );
|
|
||||||
m_fallbackPlotName = nameHelper.plotTitle();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user