#14911: Use summary vector short name as axis title when description is missing

This commit is contained in:
Magne Sjaastad committed 2026-10-14 10:45:36 +02:00
1 parent 04df5d0309
commit 71be2d0911
1 file changed
+9 -1
@@ -126,6 +126,7 @@ QString RimSummaryPlotAxisFormatter::autoAxisTitle() const
}
else
{
bool usedShortName = false;
if ( m_axisProperties->showDescription() )
{
auto candidateName = quantityName;
@@ -133,9 +134,16 @@ QString RimSummaryPlotAxisFormatter::autoAxisTitle() const
if ( sumAddress.isHistoryVector() ) candidateName = quantityName.substr( 0, quantityName.size() - 1 );
titleText = RiuSummaryQuantityNameInfoProvider::instance()->longNameFromVectorName( candidateName );
// Use the short name if no description is available
if ( titleText.empty() )
{
titleText = quantityName;
usedShortName = true;
}
}
if ( m_axisProperties->showAcronym() )
if ( m_axisProperties->showAcronym() && !usedShortName )
{
if ( !titleText.empty() )
{