diff --git a/gtk2_ardour/group_tabs.cc b/gtk2_ardour/group_tabs.cc index e1385f8b58..6fb40f5ecd 100644 --- a/gtk2_ardour/group_tabs.cc +++ b/gtk2_ardour/group_tabs.cc @@ -705,7 +705,13 @@ GroupTabs::run_new_group_dialog (RouteList const * rl, bool with_master) } RouteGroup* g = new RouteGroup (*_session, ""); - RouteGroupDialog* d = new RouteGroupDialog (g, true); + RouteGroupDialog* d = new RouteGroupDialog (g, true); // XXX + + if (rl) { + for (auto const& r : *rl) { + r->DropReferences.connect (_new_route_group_connection, invalidator (*d), boost::bind (&Dialog::response, d, RESPONSE_CANCEL), gui_context()); + } + } d->signal_response().connect (sigc::bind (sigc::mem_fun (*this, &GroupTabs::new_group_dialog_finished), d, rl ? new RouteList (*rl): 0, with_master)); d->present (); @@ -714,6 +720,7 @@ GroupTabs::run_new_group_dialog (RouteList const * rl, bool with_master) void GroupTabs::new_group_dialog_finished (int r, RouteGroupDialog* d, RouteList const * rl, bool with_master) const { + _new_route_group_connection.disconnect (); if (r == RESPONSE_OK) { if (!d->name_check()) { diff --git a/gtk2_ardour/group_tabs.h b/gtk2_ardour/group_tabs.h index a5f6dabe57..2b29b421c1 100644 --- a/gtk2_ardour/group_tabs.h +++ b/gtk2_ardour/group_tabs.h @@ -178,6 +178,8 @@ private: bool _hovering; + mutable PBD::ScopedConnection _new_route_group_connection; + /** colors that have been used for new route group tabs */ static std::list _used_colors; }; diff --git a/gtk2_ardour/route_group_dialog.cc b/gtk2_ardour/route_group_dialog.cc index 107e5be15e..38cda9f128 100644 --- a/gtk2_ardour/route_group_dialog.cc +++ b/gtk2_ardour/route_group_dialog.cc @@ -43,9 +43,9 @@ using namespace PBD; RouteGroupDialog::RouteGroupDialog (RouteGroup* g, bool creating_new) #ifndef LIVETRAX - : ArdourDialog (_("Track/bus Group"), creating_new) + : ArdourDialog (_("Track/bus Group")) #else - : ArdourDialog (_("Track Group"), creating_new) + : ArdourDialog (_("Track Group")) #endif , _group (g) , _initial_name (g->name ())