fix missing Hit destructor, which left polygons all over the canvas after deleting...
authorPaul Davis <paul@linuxaudiosystems.com>
Fri, 7 Mar 2014 04:17:04 +0000 (23:17 -0500)
committerPaul Davis <paul@linuxaudiosystems.com>
Fri, 7 Mar 2014 04:17:04 +0000 (23:17 -0500)
gtk2_ardour/hit.cc
gtk2_ardour/hit.h

index de63e187e45fca1436e8a46bba91ede6d5aabe11..feb8ca43db8461ab23f08e23bdb717b91fb2c07e 100644 (file)
@@ -39,6 +39,11 @@ Hit::Hit (MidiRegionView& region, Group* group, double size, const boost::shared
        set_height (size);
 }
 
+Hit::~Hit ()
+{
+       delete _polygon;
+}
+
 void
 Hit::move_event (double dx, double dy)
 {
index 3afdd9136775b6ba5892227494feacd2c880af70..0ce1c93634397b13d268e8d1238c5111ae859567 100644 (file)
@@ -32,14 +32,14 @@ class Hit : public NoteBase
 public:
        typedef Evoral::Note<double> NoteType;
 
-       Hit (
-               MidiRegionView&                   region,
-               ArdourCanvas::Group*              group,
-               double                            size,
-               const boost::shared_ptr<NoteType> note = boost::shared_ptr<NoteType>(),
-               bool with_events = true);
-
-       void show ();
+       Hit (MidiRegionView&                   region,
+            ArdourCanvas::Group*              group,
+            double                            size,
+            const boost::shared_ptr<NoteType> note = boost::shared_ptr<NoteType>(),
+            bool with_events = true);
+       ~Hit();
+
+        void show ();
        void hide ();
 
        ArdourCanvas::Coord x0 () const;