mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-27 00:47:43 +01:00
correctly track range selection trim and drag creation w.r.t playback priority
This commit is contained in:
parent
a3c508ce10
commit
b8054d75f1
2 changed files with 14 additions and 4 deletions
|
|
@ -4364,7 +4364,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 (Config->get_follow_edits() && !s->transport_rolling()) {
|
||||
|
|
@ -4374,8 +4374,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.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@
|
|||
|
||||
#include "control_protocol/control_protocol.h"
|
||||
|
||||
#include "editor_drag.h"
|
||||
#include "editor.h"
|
||||
#include "actions.h"
|
||||
#include "audio_time_axis.h"
|
||||
|
|
@ -1153,9 +1154,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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue