fix more range selection issues
[ardour.git] / gtk2_ardour / selection.cc
index 1009755fd435f87475943139b9c9dee0b2ffbcec..88e151c54db9a04a46c40a3f549a244aec33f22b 100644 (file)
@@ -346,13 +346,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 +522,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