summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2013-10-25 11:52:18 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2013-10-25 11:52:18 -0400
commit0bf241257bc9ab13487deaaacdccea257de98482 (patch)
tree88a95239df36a7ea5f2d5f512acc87659c265805 /gtk2_ardour
parentcfafa610f09334029f8bda4877bd7de98345ea94 (diff)
parente80d66c9085a5e5acaa75de54712b32acea082a9 (diff)
Merge branch 'ordering_fixup' of https://github.com/nmains/ardour
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/ardour_ui.cc22
1 files changed, 12 insertions, 10 deletions
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc
index 46308fed98..0261266566 100644
--- a/gtk2_ardour/ardour_ui.cc
+++ b/gtk2_ardour/ardour_ui.cc
@@ -3231,17 +3231,18 @@ ARDOUR_UI::setup_order_hint ()
we want the new routes to have their order keys set starting from
the highest order key in the selection + 1 (if available).
*/
-
- for (RouteUISelection::iterator s = mixer->selection().routes.begin(); s != mixer->selection().routes.end(); ++s) {
- if ((*s)->route()->order_key() > order_hint) {
- order_hint = (*s)->route()->order_key();
+ if (add_route_dialog->get_transient_for () == mixer->get_toplevel()) {
+ for (RouteUISelection::iterator s = mixer->selection().routes.begin(); s != mixer->selection().routes.end(); ++s) {
+ if ((*s)->route()->order_key() > order_hint) {
+ order_hint = (*s)->route()->order_key();
+ }
}
- }
-
- for (TrackSelection::iterator s = editor->get_selection().tracks.begin(); s != editor->get_selection().tracks.end(); ++s) {
- RouteTimeAxisView* tav = dynamic_cast<RouteTimeAxisView*> (*s);
- if (tav->route()->order_key() > order_hint) {
- order_hint = tav->route()->order_key();
+ } else {
+ for (TrackSelection::iterator s = editor->get_selection().tracks.begin(); s != editor->get_selection().tracks.end(); ++s) {
+ RouteTimeAxisView* tav = dynamic_cast<RouteTimeAxisView*> (*s);
+ if (tav->route()->order_key() > order_hint) {
+ order_hint = tav->route()->order_key();
+ }
}
}
@@ -3282,6 +3283,7 @@ ARDOUR_UI::add_route (Gtk::Window* float_window)
}
if (float_window) {
+ add_route_dialog->unset_transient_for ();
add_route_dialog->set_transient_for (*float_window);
}