make sure we never use ID of zero for range selections, fixing a very minor glitch...
authorPaul Davis <paul@linuxaudiosystems.com>
Thu, 13 Dec 2012 19:56:43 +0000 (19:56 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Thu, 13 Dec 2012 19:56:43 +0000 (19:56 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@13661 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/selection.cc

index cf25826676e03cc954d7dd4ab0c32870a5b1adfa..1009755fd435f87475943139b9c9dee0b2ffbcec 100644 (file)
@@ -859,7 +859,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 +895,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;