summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2015-01-17 12:40:46 -0500
committerPaul Davis <paul@linuxaudiosystems.com>2015-06-29 14:18:13 -0400
commit7592b5d3e1e8d9a9475c8c21f901ef3b72b89dc1 (patch)
tree5ac1e08fbe53227a907b6eb43e317c5cb5ada934 /gtk2_ardour
parentaefd089b888d088160a00f2769cdfa383e3e67a4 (diff)
correctly track range selection trim and drag creation w.r.t playback priority
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/editor_drag.cc12
-rw-r--r--gtk2_ardour/editor_selection.cc8
2 files changed, 14 insertions, 6 deletions
diff --git a/gtk2_ardour/editor_drag.cc b/gtk2_ardour/editor_drag.cc
index b079972a1b..99b8ff6283 100644
--- a/gtk2_ardour/editor_drag.cc
+++ b/gtk2_ardour/editor_drag.cc
@@ -96,8 +96,6 @@ DragManager::abort ()
{
_ending = true;
- cerr << "Aborting drag\n";
-
for (list<Drag*>::const_iterator i = _drags.begin(); i != _drags.end(); ++i) {
(*i)->abort ();
delete *i;
@@ -4895,7 +4893,7 @@ SelectionDrag::finished (GdkEvent* event, bool movement_occurred)
/* XXX what if its a music time selection? */
if (s) {
- if ( s->get_play_range() && s->transport_rolling() ) {
+ if (s->get_play_range() && s->transport_rolling()) {
s->request_play_range (&_editor->selection->time, true);
} else {
if (ARDOUR_UI::config()->get_follow_edits() && !s->transport_rolling()) {
@@ -4905,8 +4903,14 @@ SelectionDrag::finished (GdkEvent* event, bool movement_occurred)
s->request_locate (_editor->get_selection().time.start());
}
}
- }
+ if (_editor->get_selection().time.length() != 0) {
+ s->set_range_selection (_editor->get_selection().time.start(), _editor->get_selection().time.end_frame());
+ } else {
+ s->clear_range_selection ();
+ }
+ }
+
} else {
/* just a click, no pointer movement.
*/
diff --git a/gtk2_ardour/editor_selection.cc b/gtk2_ardour/editor_selection.cc
index 135f15da29..5bb777d739 100644
--- a/gtk2_ardour/editor_selection.cc
+++ b/gtk2_ardour/editor_selection.cc
@@ -30,6 +30,7 @@
#include "control_protocol/control_protocol.h"
+#include "editor_drag.h"
#include "editor.h"
#include "actions.h"
#include "audio_time_axis.h"
@@ -1031,9 +1032,12 @@ Editor::time_selection_changed ()
ActionManager::set_sensitive (ActionManager::time_selection_sensitive_actions, true);
}
- /* propagate into backend */
+ /* propagate into backend, but only when there is no drag or we are at
+ * the end of a drag, otherwise this is too expensive (could case a
+ * locate per mouse motion event.
+ */
- if (_session) {
+ if (_session && !_drags->active()) {
if (selection->time.length() != 0) {
_session->set_range_selection (selection->time.start(), selection->time.end_frame());
} else {