Mercurial > hg > svcore
comparison data/model/TextModel.h @ 1725:78fe29adfd16
Re-implement extendEndFrame behaviour, used by Tony application
author | Chris Cannam |
---|---|
date | Wed, 19 Jun 2019 13:32:52 +0100 |
parents | cd6be949a16a |
children | 9d82b164f264 |
comparison
equal
deleted
inserted
replaced
1724:157c62ff0056 | 1725:78fe29adfd16 |
---|---|
57 bool isOK() const override { return true; } | 57 bool isOK() const override { return true; } |
58 | 58 |
59 sv_frame_t getStartFrame() const override { | 59 sv_frame_t getStartFrame() const override { |
60 return m_events.getStartFrame(); | 60 return m_events.getStartFrame(); |
61 } | 61 } |
62 sv_frame_t getEndFrame() const override { | 62 sv_frame_t getTrueEndFrame() const override { |
63 if (m_events.isEmpty()) return 0; | 63 if (m_events.isEmpty()) return 0; |
64 sv_frame_t e = m_events.getEndFrame() + 1; | 64 sv_frame_t e = m_events.getEndFrame() + 1; |
65 if (e % m_resolution == 0) return e; | 65 if (e % m_resolution == 0) return e; |
66 else return (e / m_resolution + 1) * m_resolution; | 66 else return (e / m_resolution + 1) * m_resolution; |
67 } | 67 } |