summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Loftis <ben@harrisonconsoles.com>2018-02-27 13:08:40 -0600
committerBen Loftis <ben@harrisonconsoles.com>2018-02-27 13:08:40 -0600
commitd88cdcc1bf175b7c09aa3bee0ed075f838c2c423 (patch)
tree9bcab19eeb39824179e40a913b88f900fa9c76a6
parentfcabb275616d8fcd90f69bd77a5afd46cf23ea27 (diff)
Reinstate the ability to split regions while dragging playhead. I think this was unintentionally lost.
-rw-r--r--gtk2_ardour/editor.cc9
-rw-r--r--gtk2_ardour/editor_ops.cc5
2 files changed, 8 insertions, 6 deletions
diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc
index 60e0ab4a97..d2d258b68c 100644
--- a/gtk2_ardour/editor.cc
+++ b/gtk2_ardour/editor.cc
@@ -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.
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc
index 1ae5dc449b..364dace9b9 100644
--- a/gtk2_ardour/editor_ops.cc
+++ b/gtk2_ardour/editor_ops.cc
@@ -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;
}