Tweak deletion, emit CatchDeletion() only once
authorRobin Gareus <robin@gareus.org>
Sat, 24 Aug 2019 16:42:51 +0000 (18:42 +0200)
committerRobin Gareus <robin@gareus.org>
Sat, 24 Aug 2019 16:42:51 +0000 (18:42 +0200)
commit1f05baa88163696052359552469a4a88be361912
tree49a57eea03d03f20d8da0a7a5d06a6649d12797c
parent7859340191a93c1f36b6dc9b513fa7c70a94cc1b
Tweak deletion, emit CatchDeletion() only once

Parent class d'tor runs after derived class d'tor. By the time
~TimeAxisView() is called, the actual object has already been
deleted and dyanamic_cast<RouteTimeAxisView*> or
dynamic_cast<AutomationTimeAxisView*> will fail.

CatchDeletion() needs to be emitted from the actual d'tor of the object.

There are currently three non-virtual TAVs:
 * RouteTimeAxisView
 * AutomationTimeAxisView
 * VCATimeAxisView

The first two already directly emit CatchDeletion(), there's no need to
call it again from ~TimeAxisView().
gtk2_ardour/time_axis_view.cc
gtk2_ardour/vca_time_axis.cc