mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-26 07:00:17 -05:00
#14911: Use summary vector short name as axis title when description is missing
This commit is contained in:
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() )
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user