mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#987 Summary Plot : Do not show default unit text if empty calculation unit text
This commit is contained in:
parent
ffbd4cda82
commit
bc6a367635
@ -73,7 +73,8 @@ std::string RifCalculatedSummaryCurveReader::unitName(const RifEclipseSummaryAdd
|
||||
{
|
||||
return calculation->unitName().toStdString();
|
||||
}
|
||||
return "Calculated Curve Unit";
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -63,7 +63,7 @@ QString RimSummaryCurveAutoName::curveName(const RifEclipseSummaryAddress& summa
|
||||
{
|
||||
text += summaryAddress.quantityName();
|
||||
|
||||
if (m_unit && summaryCurve)
|
||||
if (m_unit && summaryCurve && !summaryCurve->unitNameY().empty())
|
||||
{
|
||||
text += "[" + summaryCurve->unitNameY() + "]";
|
||||
}
|
||||
|
@ -251,7 +251,11 @@ QString RimSummaryPlotYAxisFormatter::autoAxisTitle() const
|
||||
{
|
||||
assembledYAxisText += QString::fromStdString(quantIt) + " ";
|
||||
}
|
||||
assembledYAxisText += "[" + QString::fromStdString(unitIt.first) + scaleFactorText + "] ";
|
||||
|
||||
if (!unitIt.first.empty())
|
||||
{
|
||||
assembledYAxisText += "[" + QString::fromStdString(unitIt.first) + scaleFactorText + "] ";
|
||||
}
|
||||
}
|
||||
|
||||
if (m_timeHistoryCurveQuantities.size() > 0)
|
||||
|
Loading…
Reference in New Issue
Block a user