Reinstate the ability to split regions while dragging playhead. I think this was...
authorBen Loftis <ben@harrisonconsoles.com>
Tue, 27 Feb 2018 19:08:40 +0000 (13:08 -0600)
committerBen Loftis <ben@harrisonconsoles.com>
Tue, 27 Feb 2018 19:08:40 +0000 (13:08 -0600)
gtk2_ardour/editor.cc
gtk2_ardour/editor_ops.cc

index 60e0ab4a9748fbc132cb64d5643e970b26b61bca..d2d258b68cdce3912c947ff8ff6623bf0d884866 100644 (file)
@@ -4674,8 +4674,9 @@ Editor::get_preferred_edit_position (EditIgnoreOption ignore, bool from_context_
 
        switch (ep) {
        case EditAtPlayhead:
-               if (_dragging_playhead && _control_scroll_target) {
-                       where = *_control_scroll_target;
+               if (_dragging_playhead) {
+                       /* NOTE: since the user is dragging with the mouse, this operation will implicitly be Snapped */
+                       where = playhead_cursor->current_sample();
                } else {
                        where = _session->audible_sample();
                }
@@ -5792,9 +5793,7 @@ Editor::super_rapid_screen_update ()
        if (!UIConfiguration::instance().get_show_snapped_cursor()) {
                snapped_cursor->hide ();
        } else if (_edit_point == EditAtPlayhead && !_dragging_playhead) {
-               snap_to (where);  // can't use snap_to_with_modifier?
-               snapped_cursor->set_position (where.sample);
-               snapped_cursor->show ();
+               /* EditAtPlayhead does not snap */
        } else if (_edit_point == EditAtSelectedMarker) {
                /* NOTE: I don't think EditAtSelectedMarker should snap. They are what they are.
                 * however, the current editing code -does- snap so I'll draw it that way for now.
index 1ae5dc449b65a5d263f09e1baaa13da99da92784..364dace9b901ad97ff149f360fff0801f6dbb700 100644 (file)
@@ -6348,7 +6348,10 @@ Editor::set_playhead_cursor ()
 void
 Editor::split_region ()
 {
-       if (_drags->active ()) {
+       if (_dragging_playhead) {
+               /*continue*/
+       } else if (_drags->active ()) {
+               /*any other kind of drag, bail out so we avoid Undo snafu*/
                return;
        }