remove redundant (identical) 2nd conditional, and improve comment
[ardour.git] / gtk2_ardour / group_tabs.cc
index 057f55163660753f652a46ff98f131cd7d16505c..5b5d5d1809cb92baaeb615c5a400e802d06b6132 100644 (file)
@@ -31,7 +31,7 @@
 #include "route_group_dialog.h"
 #include "group_tabs.h"
 #include "keyboard.h"
-#include "i18n.h"
+#include "pbd/i18n.h"
 #include "ardour_ui.h"
 #include "rgb_macros.h"
 #include "ui_config.h"
@@ -341,9 +341,6 @@ GroupTabs::get_menu (RouteGroup* g, bool in_tab_area)
        const VCAList vcas = _session->vca_manager().vcas ();
 
        if (!in_tab_area) {
-               items.push_back (MenuElem (_("Create New Group ..."), sigc::bind (sigc::mem_fun(*this, &GroupTabs::run_new_group_dialog), (RouteList const *) 0, false)));
-               items.push_back (MenuElem (_("Create New Group with Control Master ..."), sigc::bind (sigc::mem_fun(*this, &GroupTabs::run_new_group_dialog), (RouteList const *) 0, true)));
-
                /* context menu is not for a group tab, show the "create new
                   from" items here
                */
@@ -603,6 +600,10 @@ GroupTabs::new_group_dialog_finished (int r, RouteGroupDialog* d, RouteList cons
 {
        if (r == RESPONSE_OK) {
 
+               if (!d->name_check()) {
+                       return;
+               }
+
                _session->add_route_group (d->group());
 
                if (rl) {
@@ -678,14 +679,14 @@ GroupTabs::collect (RouteGroup* g)
                                --diff;
                        }
 
-                       (*j)->set_presentation_order_explicit (coll);
+                       (*j)->set_presentation_order (coll, false);
 
                        ++coll;
                        ++i;
 
                } else {
 
-                       (*j)->set_presentation_order_explicit (k + diff);
+                       (*j)->set_presentation_order (k + diff, false);
 
                }