stop AddRouteDialog from being modal and from using a recursive run loop

This commit is contained in:
Paul Davis 2016-06-12 14:53:55 -04:00
parent 0852d05643
commit d42f075408
4 changed files with 13 additions and 3 deletions

View File

@ -63,7 +63,6 @@ AddRouteDialog::AddRouteDialog ()
, instrument_label (_("Instrument:"))
{
set_name ("AddRouteDialog");
set_modal (true);
set_skip_taskbar_hint (true);
set_resizable (false);
set_position (WIN_POS_MOUSE);

View File

@ -4005,7 +4005,9 @@ ARDOUR_UI::start_duplicate_routes ()
void
ARDOUR_UI::add_route ()
{
int count;
if (!add_route_dialog.get (false)) {
add_route_dialog->signal_response().connect (sigc::mem_fun (*this, &ARDOUR_UI::add_route_dialog_finished));
}
if (!_session) {
return;
@ -4016,7 +4018,14 @@ ARDOUR_UI::add_route ()
return;
}
ResponseType r = (ResponseType) add_route_dialog->run ();
add_route_dialog->set_position (WIN_POS_MOUSE);
add_route_dialog->present();
}
void
ARDOUR_UI::add_route_dialog_finished (int r)
{
int count;
add_route_dialog->hide();

View File

@ -261,6 +261,7 @@ public:
void synchronize_sync_source_and_video_pullup ();
void add_route ();
void add_route_dialog_finished (int);
void add_routes_part_two ();
void add_routes_thread ();

View File

@ -40,6 +40,7 @@ public:
void new_group ();
void set_group (ARDOUR::RouteGroup *);
void new_group_dialog_finished (int, RouteGroupDialog*);
Gtk::Menu* _menu;
PBD::PropertyList* _default_properties;