# HG changeset patch # User Chris Cannam # Date 1482234794 0 # Node ID 42217d9c592061231b6f0e1c2001715e082e8ef3 # Parent d421df27e1848552c50ded50e348fc3239d2e71b Fix erroneous use of single-colour setting to determine dark/light background when in segmentation mode diff -r d421df27e184 -r 42217d9c5920 layer/TimeValueLayer.h --- a/layer/TimeValueLayer.h Tue Dec 20 10:49:24 2016 +0000 +++ b/layer/TimeValueLayer.h Tue Dec 20 11:53:14 2016 +0000 @@ -146,6 +146,7 @@ void setProperties(const QXmlAttributes &attributes); + /// Override from SingleColourLayer virtual ColourSignificance getLayerColourSignificance() const { if (m_plotStyle == PlotSegmentation) { return ColourHasMeaningfulValue; @@ -154,6 +155,15 @@ } } + /// Override from SingleColourLayer + virtual bool hasLightBackground() const { + if (m_plotStyle == PlotSegmentation) { + return true; + } else { + return SingleColourLayer::hasLightBackground(); + } + } + /// VerticalScaleLayer and ColourScaleLayer methods virtual int getYForValue(LayerGeometryProvider *, double value) const; virtual double getValueForY(LayerGeometryProvider *, int y) const;