Bugfix: show y axis text even if ensemble and summary curves are turned off.

This commit is contained in:
jonjenssen
2020-11-10 18:27:29 +01:00
committed by Magne Sjaastad
parent 451a049e0a
commit 7f3df954ad
2 changed files with 25 additions and 7 deletions

View File

@@ -184,8 +184,12 @@ QString RimSummaryPlotAxisFormatter::autoAxisTitle() const
auto addToUnitToQuantityMap =[&]( const std::string& unitText,
const RifEclipseSummaryAddress& sumAddress )
{
// remove any stats prefix from the quantity name
size_t cutPos = sumAddress.quantityName().find(':');
if (cutPos == std::string::npos) cutPos = -1;
std::string quantityNameForDisplay;
const std::string& quantityName = sumAddress.quantityName();
const std::string& quantityName = sumAddress.quantityName().substr(cutPos+1);
if ( sumAddress.category() == RifEclipseSummaryAddress::SUMMARY_CALCULATED )
{
@@ -225,11 +229,7 @@ QString RimSummaryPlotAxisFormatter::autoAxisTitle() const
RifEclipseSummaryAddress sumAddress;
std::string unitText;
if ( rimCurve->summaryAddressY().category() == RifEclipseSummaryAddress::SUMMARY_ENSEMBLE_STATISTICS )
{
continue;
}
else if ( m_axisProperties->plotAxisType() == RiaDefines::PlotAxis::PLOT_AXIS_BOTTOM )
if ( m_axisProperties->plotAxisType() == RiaDefines::PlotAxis::PLOT_AXIS_BOTTOM )
{
sumAddress = rimCurve->summaryAddressX();
unitText = rimCurve->unitNameX();