Mercurial > hg > svcore
changeset 1171:fa1bec83441e
Fix display of 3d model data in data editor, by adding start frame offset (formerly ignored)
author | Chris Cannam |
---|---|
date | Fri, 04 Mar 2016 09:50:09 +0000 |
parents | d9c766274c8b |
children | 59ae7e04f7e9 |
files | data/model/DenseThreeDimensionalModel.h |
diffstat | 1 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/data/model/DenseThreeDimensionalModel.h Sat Jan 30 12:08:50 2016 +0000 +++ b/data/model/DenseThreeDimensionalModel.h Fri Mar 04 09:50:09 2016 +0000 @@ -153,12 +153,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); } @@ -172,10 +172,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: