diff layer/SingleColourLayer.h @ 768:8b614632568c

SingleColourLayer: fix colour reference counting * Always unref/ref colour before/after changing. * Ref colour in constructor and unref in destructor.
author Jakob Leben <jakob.leben@gmail.com>
date Sat, 12 Apr 2014 01:07:05 -0700
parents 156a120345ae
children a5488775f880
line wrap: on
line diff
--- a/layer/SingleColourLayer.h	Fri Apr 11 23:22:55 2014 -0700
+++ b/layer/SingleColourLayer.h	Sat Apr 12 01:07:05 2014 -0700
@@ -75,6 +75,7 @@
 
 protected:
     SingleColourLayer();
+    virtual ~SingleColourLayer();
 
     virtual QColor getBaseQColor() const;
     virtual QColor getBackgroundQColor(View *v) const;
@@ -91,6 +92,10 @@
     int m_colour;
     bool m_colourExplicitlySet;
     bool m_defaultColourSet;
+
+private:
+    void refColor();
+    void unrefColor();
 };
 
 #endif