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:")) , instrument_label (_("Instrument:"))
{ {
set_name ("AddRouteDialog"); set_name ("AddRouteDialog");
set_modal (true);
set_skip_taskbar_hint (true); set_skip_taskbar_hint (true);
set_resizable (false); set_resizable (false);
set_position (WIN_POS_MOUSE); set_position (WIN_POS_MOUSE);

View file

@ -4005,7 +4005,9 @@ ARDOUR_UI::start_duplicate_routes ()
void void
ARDOUR_UI::add_route () 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) { if (!_session) {
return; return;
@ -4016,7 +4018,14 @@ ARDOUR_UI::add_route ()
return; 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(); add_route_dialog->hide();

View file

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

View file

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