summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2014-12-26 13:05:28 +0100
committerRobin Gareus <robin@gareus.org>2014-12-26 13:10:01 +0100
commitc5db19bc52809988bb6a1404dd70709ca7254816 (patch)
tree0df01d4bcbf60ea0df7fe668cc7fa8541a428b08 /gtk2_ardour
parente427724bd7402d9ecf7c35bc8e9678a7299acf28 (diff)
fix "alt+g" duplicate range selection.
This is a somewhat wacky workaround but no there is no better solution in sight. Related bug: select range, save, quit, restart & re-load session -> range selected but tool == object
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/editor_ops.cc18
1 files changed, 15 insertions, 3 deletions
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc
index 2327a318d4..4589844bf6 100644
--- a/gtk2_ardour/editor_ops.cc
+++ b/gtk2_ardour/editor_ops.cc
@@ -2690,8 +2690,14 @@ Editor::create_region_from_selection (vector<boost::shared_ptr<Region> >& new_re
return;
}
- framepos_t start = selection->time[clicked_selection].start;
- framepos_t end = selection->time[clicked_selection].end;
+ framepos_t start, end;
+ if (clicked_selection) {
+ start = selection->time[clicked_selection].start;
+ end = selection->time[clicked_selection].end;
+ } else {
+ start = selection->time.start();
+ end = selection->time.end_frame();
+ }
TrackViewList ts = selection->tracks.filter_to_unique_playlists ();
sort_track_selection (ts);
@@ -4591,7 +4597,13 @@ Editor::duplicate_selection (float times)
continue;
}
playlist->clear_changes ();
- playlist->duplicate (*ri, selection->time[clicked_selection].end, times);
+ framepos_t end;
+ if (clicked_selection) {
+ end = selection->time[clicked_selection].end;
+ } else {
+ end = selection->time.end_frame();
+ }
+ playlist->duplicate (*ri, end, times);
_session->add_command (new StatefulDiffCommand (playlist));
++ri;