Fix crash when deleting route while creating a routegroup for it
This reverts00e35c48b6
. Modal dialog does not allow to change the color of the RouteGroup. Interaction with the colorpicker was not possible. See also0db79b8023
This commit is contained in:
parent
b501eaf43a
commit
b55e94ced4
@ -698,7 +698,13 @@ GroupTabs::run_new_group_dialog (RouteList const * rl, bool with_master)
|
|||||||
}
|
}
|
||||||
|
|
||||||
RouteGroup* g = new RouteGroup (*_session, "");
|
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->signal_response().connect (sigc::bind (sigc::mem_fun (*this, &GroupTabs::new_group_dialog_finished), d, rl ? new RouteList (*rl): 0, with_master));
|
||||||
d->present ();
|
d->present ();
|
||||||
@ -707,6 +713,7 @@ GroupTabs::run_new_group_dialog (RouteList const * rl, bool with_master)
|
|||||||
void
|
void
|
||||||
GroupTabs::new_group_dialog_finished (int r, RouteGroupDialog* d, RouteList const * rl, bool with_master) const
|
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 (r == RESPONSE_OK) {
|
||||||
|
|
||||||
if (!d->name_check()) {
|
if (!d->name_check()) {
|
||||||
|
@ -178,6 +178,8 @@ private:
|
|||||||
|
|
||||||
bool _hovering;
|
bool _hovering;
|
||||||
|
|
||||||
|
mutable PBD::ScopedConnection _new_route_group_connection;
|
||||||
|
|
||||||
/** colors that have been used for new route group tabs */
|
/** colors that have been used for new route group tabs */
|
||||||
static std::list<Gdk::Color> _used_colors;
|
static std::list<Gdk::Color> _used_colors;
|
||||||
};
|
};
|
||||||
|
@ -42,7 +42,7 @@ using namespace std;
|
|||||||
using namespace PBD;
|
using namespace PBD;
|
||||||
|
|
||||||
RouteGroupDialog::RouteGroupDialog (RouteGroup* g, bool creating_new)
|
RouteGroupDialog::RouteGroupDialog (RouteGroup* g, bool creating_new)
|
||||||
: ArdourDialog (_("Track/bus Group"), creating_new)
|
: ArdourDialog (_("Track/bus Group"))
|
||||||
, _group (g)
|
, _group (g)
|
||||||
, _initial_name (g->name ())
|
, _initial_name (g->name ())
|
||||||
, _active (_("Active"))
|
, _active (_("Active"))
|
||||||
|
Loading…
Reference in New Issue
Block a user