changeset 1173:abb78e824820 3.0-integration

Merge from default branch
author Chris Cannam
date Fri, 04 Mar 2016 12:38:20 +0000
parents 6877f4200912 (current diff) 59ae7e04f7e9 (diff)
children 4018fc0189bc
files data/model/DenseThreeDimensionalModel.h
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/data/model/DenseThreeDimensionalModel.h	Wed Mar 02 16:16:36 2016 +0000
+++ b/data/model/DenseThreeDimensionalModel.h	Fri Mar 04 12:38:20 2016 +0000
@@ -144,12 +144,12 @@
     {
         switch (column) {
         case 0: {
-            RealTime rt = RealTime::frame2RealTime(row * getResolution(),
-                                                   getSampleRate());
+            RealTime rt = RealTime::frame2RealTime
+                (row * getResolution() + getStartFrame(), getSampleRate());
             return rt.toText().c_str();
         }
         case 1:
-            return int(row * getResolution());
+            return int(row * getResolution() + getStartFrame());
         default:
             return getValueAt(row, column - 2);
         }
@@ -163,10 +163,10 @@
     }
 
     virtual sv_frame_t getFrameForRow(int row) const {
-        return sv_frame_t(row) * getResolution();
+        return sv_frame_t(row) * getResolution() + getStartFrame();
     }
     virtual int getRowForFrame(sv_frame_t frame) const {
-        return int(frame / getResolution());
+        return int((frame - getStartFrame()) / getResolution());
     }
 
 protected: