X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fselection.cc;h=146d9a65c50f9c2da169a66bdc44b8a7988e0aac;hb=741f9de3f7dda286181419c33cfe361a4f75c775;hp=cf25826676e03cc954d7dd4ab0c32870a5b1adfa;hpb=40e9dae606c034ce078e929421f8ae122dda4efc;p=ardour.git diff --git a/gtk2_ardour/selection.cc b/gtk2_ardour/selection.cc index cf25826676..146d9a65c5 100644 --- a/gtk2_ardour/selection.cc +++ b/gtk2_ardour/selection.cc @@ -119,7 +119,6 @@ Selection::clear_objects () clear_playlists (); clear_midi_notes (); clear_midi_regions (); - clear_markers (); } void @@ -346,13 +345,13 @@ Selection::toggle (framepos_t start, framepos_t end) /* XXX this implementation is incorrect */ - time.push_back (AudioRange (start, end, next_time_id++)); + time.push_back (AudioRange (start, end, ++next_time_id)); time.consolidate (); time.sort (cmp); TimeChanged (); - return next_time_id - 1; + return next_time_id; } void @@ -522,13 +521,13 @@ Selection::add (framepos_t start, framepos_t end) /* XXX this implementation is incorrect */ - time.push_back (AudioRange (start, end, next_time_id++)); + time.push_back (AudioRange (start, end, ++next_time_id)); time.consolidate (); time.sort (cmp); TimeChanged (); - return next_time_id - 1; + return next_time_id; } void @@ -859,7 +858,7 @@ Selection::set (framepos_t start, framepos_t end) } if (time.empty()) { - time.push_back (AudioRange (start, end, next_time_id++)); + time.push_back (AudioRange (start, end, ++next_time_id)); } else { /* reuse the first entry, and remove all the rest */ @@ -895,7 +894,7 @@ Selection::set_preserving_all_ranges (framepos_t start, framepos_t end) } if (time.empty ()) { - time.push_back (AudioRange (start, end, next_time_id++)); + time.push_back (AudioRange (start, end, ++next_time_id)); } else { time.sort (AudioRangeComparator ()); time.front().start = start; @@ -1130,7 +1129,7 @@ void Selection::set (Marker* m) { clear_time (); //enforce region/object exclusivity - clear_objects(); + markers.clear (); add (m); } @@ -1138,8 +1137,6 @@ Selection::set (Marker* m) void Selection::toggle (Marker* m) { - clear_time (); //enforce region/object exclusivity - MarkerSelection::iterator i; if ((i = find (markers.begin(), markers.end(), m)) == markers.end()) {