tempo mapping: fix lifetime management of mapping bar text

This commit is contained in:
Paul Davis 2023-04-10 09:17:17 -06:00
parent def884e26c
commit f7f3c1a920
1 changed files with 6 additions and 0 deletions

View File

@ -694,6 +694,12 @@ TempoMarker::TempoMarker (PublicEditor& editor, ArdourCanvas::Item& parent, Ardo
TempoMarker::~TempoMarker ()
{
/* the mapping text is a little unusual in that we do not leave its
parent (the editor's mapping_group) to manage its lifetime. We must
explicitly remove and delete it.
*/
_mapping_text->parent()->remove (_mapping_text);
delete _mapping_text;
delete _curve;
}