diff data/model/SparseModel.h @ 1072:882d448c8a6d

Fix #1222 CSV export of time-instants layer omits last point
author Chris Cannam
date Fri, 15 May 2015 09:15:57 +0100
parents 9fc8823a73e9
children ed207f89aaef
line wrap: on
line diff
--- a/data/model/SparseModel.h	Thu May 14 14:04:41 2015 +0100
+++ b/data/model/SparseModel.h	Fri May 15 09:15:57 2015 +0100
@@ -153,18 +153,20 @@
                        QString extraAttributes = "") const;
 
     virtual QString toDelimitedDataString(QString delimiter) const {
-        return toDelimitedDataStringWithOptions(delimiter, DataExportDefaults);
+        return toDelimitedDataStringWithOptions
+            (delimiter, DataExportDefaults);
     }
 
     virtual QString toDelimitedDataStringWithOptions(QString delimiter,
                                                      DataExportOptions opts) const {
         return toDelimitedDataStringSubsetWithOptions
             (delimiter, opts,
-             std::min(getStartFrame(), sv_frame_t(0)), getEndFrame());
+             std::min(getStartFrame(), sv_frame_t(0)), getEndFrame() + 1);
     }
 
     virtual QString toDelimitedDataStringSubset(QString delimiter, sv_frame_t f0, sv_frame_t f1) const {
-        return toDelimitedDataStringSubsetWithOptions(delimiter, DataExportDefaults, f0, f1);
+        return toDelimitedDataStringSubsetWithOptions
+            (delimiter, DataExportDefaults, f0, f1);
     }
 
     virtual QString toDelimitedDataStringSubsetWithOptions(QString delimiter, DataExportOptions opts, sv_frame_t f0, sv_frame_t f1) const {