Close RouteGroup dialog when route is deleted
This fixes a crash when trying to interact with the RouteGroup dialog after deleting the group
This commit is contained in:
parent
06962c7728
commit
0db79b8023
@ -30,6 +30,7 @@
|
||||
|
||||
#include "gtkmm2ext/colors.h"
|
||||
|
||||
#include "gui_thread.h"
|
||||
#include "route_group_dialog.h"
|
||||
#include "group_tabs.h"
|
||||
|
||||
@ -177,6 +178,8 @@ RouteGroupDialog::RouteGroupDialog (RouteGroup* g, bool creating_new)
|
||||
add_button (Stock::CANCEL, RESPONSE_CANCEL);
|
||||
add_button (Stock::NEW, RESPONSE_OK);
|
||||
set_default_response (RESPONSE_OK);
|
||||
} else {
|
||||
_group->Destroyed.connect (_group_connection, invalidator (*this), boost::bind (&Dialog::response, this, RESPONSE_CANCEL), gui_context());
|
||||
}
|
||||
|
||||
show_all_children ();
|
||||
|
@ -29,6 +29,10 @@
|
||||
#include "ardour_dialog.h"
|
||||
#include "stripable_colorpicker.h"
|
||||
|
||||
namespace ARDOUR {
|
||||
class RouteGroup;
|
||||
}
|
||||
|
||||
class RouteGroupDialog : public ArdourDialog
|
||||
{
|
||||
public:
|
||||
@ -59,7 +63,8 @@ private:
|
||||
void gain_toggled ();
|
||||
void update ();
|
||||
bool unique_name (std::string const name) const;
|
||||
|
||||
PBD::ScopedConnection _group_connection;
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user