}
route->gui_changed.connect (mem_fun(*this, &Editor::handle_gui_changes));
- cerr << "Connect to GA for " << tv << " named " << tv->name() << endl;
tv->GoingAway.connect (bind (mem_fun(*this, &Editor::remove_route), tv));
}
if (current_mixer_strip->route() == route) {
- cerr << "CMS is the one being deleted\n";
-
if (next_tv) {
- cerr << "move to " << next_tv->name() << endl;
set_selected_mixer_strip (*next_tv);
} else {
- cerr << "no next TV, hide editor mixer strip\n";
- /* make the editor mixer strip go away setting the
+ /* make the editor mixer strip go away by setting the
* button to inactive (which also unticks the menu option)
*/
ActionManager::uncheck_toggleaction ("<Actions>/Editor/show-editor-mixer");
}
- } else {
- cerr << "CMS differs from the deleted one\n";
}
}
{
init ();
+
+ if (!_mixer_owned) {
+ /* the editor mixer strip: don't destroy it every time
+ the underlying route goes away.
+ */
+
+ self_destruct = false;
+ }
}
MixerStrip::MixerStrip (Mixer_UI& mx, Session& sess, boost::shared_ptr<Route> rt, bool in_mixer)
void
MixerStrip::hide_clicked ()
{
- // LAME fix to reset the button status for when it is redisplayed (part 1)
- hide_button.set_sensitive(false);
-
+ // LAME fix to reset the button status for when it is redisplayed (part 1)
+ hide_button.set_sensitive(false);
+
if (_embedded) {
- Hiding(); /* EMIT_SIGNAL */
+ Hiding(); /* EMIT_SIGNAL */
} else {
_mixer.hide_strip (this);
}
- // (part 2)
+ // (part 2)
hide_button.set_sensitive(true);
}
void
RouteUI::init ()
{
+ self_destruct = true;
xml_node = 0;
mute_menu = 0;
solo_menu = 0;
up when the route is destroyed.
*/
- new PairedShiva<Route,RouteUI> (*_route, *this);
+ if (self_destruct) {
+ new PairedShiva<Route,RouteUI> (*_route, *this);
+ }
mute_button->set_controllable (&_route->mute_control());
mute_button->set_label (m_name);
RouteUI::~RouteUI()
{
- GoingAway (); /* EMIT SIGNAL */
+ /* derived classes should emit GoingAway so that they receive the signal
+ when the object is still a legal derived instance.
+ */
if (solo_menu) {
delete solo_menu;
std::string m_name;
std::string r_name;
+ bool self_destruct;
+
void init ();
void reset ();