edit operations should depend on the existence of an explicit range, NOT the mouse...
authorBen Loftis <ben@glw.com>
Wed, 28 Nov 2012 17:07:35 +0000 (17:07 +0000)
committerBen Loftis <ben@glw.com>
Wed, 28 Nov 2012 17:07:35 +0000 (17:07 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@13563 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/editor.cc
gtk2_ardour/editor_markers.cc
gtk2_ardour/editor_ops.cc
gtk2_ardour/editor_selection.cc

index 00a2e8b900c6db041918937f12f19cf356ce34fa..453ad7b4b19acf98cc2bac03473f803f0c52a85e 100644 (file)
@@ -3262,15 +3262,9 @@ Editor::duplicate_range (bool with_dialog)
 {
        float times = 1.0f;
 
-       if (mouse_mode == MouseRange) {
-               if (selection->time.length() == 0) {
-                       return;
-               }
-       }
-
        RegionSelection rs = get_regions_from_selection_and_entered ();
 
-       if (mouse_mode != MouseRange && rs.empty()) {
+       if ( selection->time.length() == 0 && rs.empty()) {
                return;
        }
 
@@ -3317,7 +3311,7 @@ Editor::duplicate_range (bool with_dialog)
                times = adjustment.get_value();
        }
 
-       if (mouse_mode == MouseRange) {
+       if (selection->time.length() != 0) {
                duplicate_selection (times);
        } else {
                duplicate_some_regions (rs, times);
index 28706ac7bc7d822146757edf5c8ef79354f6fef8..1eae5d7b3863d02830d7d474c7cffbe8ab7dcf8f 100644 (file)
@@ -1175,11 +1175,9 @@ Editor::marker_menu_set_from_selection ()
 
                        /* if range selection use first to last */
 
-                       if (mouse_mode == Editing::MouseRange) {
-                               if (!selection->time.empty()) {
-                                       l->set_start (selection->time.start());
-                                       l->set_end (selection->time.end_frame());
-                               }
+                       if (!selection->time.empty()) {
+                               l->set_start (selection->time.start());
+                               l->set_end (selection->time.end_frame());
                        }
                        else {
                                if (!selection->regions.empty()) {
index 80afe57d76575071a4ce03d0310a536ed0eb7102..eac60fd3324170ac0af9d7a7e589c857757821a9 100644 (file)
@@ -2725,7 +2725,7 @@ Editor::separate_region_from_selection ()
           returns a single range.
        */
 
-       if (mouse_mode == MouseRange && !selection->time.empty()) {
+       if (!selection->time.empty()) {
 
                separate_regions_between (selection->time);
 
index 3f88ddbce57f7b74951f75b7c6859332fee4de18..7ee19bdcecc0de7559c6afb699d3e70b94353351 100644 (file)
@@ -1817,9 +1817,9 @@ Editor::get_edit_op_range (framepos_t& start, framepos_t& end) const
        framepos_t m;
        bool ignored;
 
-       /* in range mode, use any existing selection */
+       /* if an explicit range exists, use it */
 
-       if (mouse_mode == MouseRange && !selection->time.empty()) {
+       if (!selection->time.empty()) {
                /* we know that these are ordered */
                start = selection->time.start();
                end = selection->time.end_frame();