#4303 Calculated curve : Always show scaling factor in axis legend text

This commit is contained in:
Magne Sjaastad 2019-04-09 08:45:21 +02:00
parent 35e1d5d455
commit af46490b9f

View File

@ -279,9 +279,14 @@ QString RimSummaryPlotYAxisFormatter::autoAxisTitle() const
assembledYAxisText += QString::fromStdString(quantIt) + " ";
}
if (m_axisProperties->showUnitText() && !unitIt.first.empty())
if (m_axisProperties->showUnitText())
{
assembledYAxisText += "[" + QString::fromStdString(unitIt.first) + scaleFactorText + "] ";
QString unitAndScaleText = QString::fromStdString(unitIt.first) + scaleFactorText;
if (!unitAndScaleText.isEmpty())
{
assembledYAxisText += "[" + unitAndScaleText + "] ";
}
}
}