13
0

fix missing Hit destructor, which left polygons all over the canvas after deleting the Hit object(s)

This commit is contained in:
Paul Davis 2014-03-06 23:17:04 -05:00
parent 41c4c41eaa
commit fa5529b694
2 changed files with 12 additions and 7 deletions

View File

@ -39,6 +39,11 @@ Hit::Hit (MidiRegionView& region, Group* group, double size, const boost::shared
set_height (size); set_height (size);
} }
Hit::~Hit ()
{
delete _polygon;
}
void void
Hit::move_event (double dx, double dy) Hit::move_event (double dx, double dy)
{ {

View File

@ -32,14 +32,14 @@ class Hit : public NoteBase
public: public:
typedef Evoral::Note<double> NoteType; typedef Evoral::Note<double> NoteType;
Hit ( Hit (MidiRegionView& region,
MidiRegionView& region, ArdourCanvas::Group* group,
ArdourCanvas::Group* group, double size,
double size, const boost::shared_ptr<NoteType> note = boost::shared_ptr<NoteType>(),
const boost::shared_ptr<NoteType> note = boost::shared_ptr<NoteType>(), bool with_events = true);
bool with_events = true); ~Hit();
void show (); void show ();
void hide (); void hide ();
ArdourCanvas::Coord x0 () const; ArdourCanvas::Coord x0 () const;