comparison data/model/SparseModel.h @ 1119:e22bfe8ca248 tonioni

fixes the problem that the last note was not exported to csv
author Matthias Mauch <mail@matthiasmauch.net>
date Fri, 14 Aug 2015 18:16:14 +0100
parents 9fc8823a73e9
children 39019ce29178
comparison
equal deleted inserted replaced
1068:135c5899a71f 1119:e22bfe8ca248
171 if (opts & DataExportFillGaps) { 171 if (opts & DataExportFillGaps) {
172 return toDelimitedDataStringSubsetFilled(delimiter, opts, f0, f1); 172 return toDelimitedDataStringSubsetFilled(delimiter, opts, f0, f1);
173 } else { 173 } else {
174 QString s; 174 QString s;
175 for (PointListConstIterator i = m_points.begin(); i != m_points.end(); ++i) { 175 for (PointListConstIterator i = m_points.begin(); i != m_points.end(); ++i) {
176 if (i->frame >= f0 && i->frame < f1) { 176 if (i->frame >= f0 && i->frame <= f1) {
177 s += i->toDelimitedDataString(delimiter, opts, m_sampleRate) + "\n"; 177 s += i->toDelimitedDataString(delimiter, opts, m_sampleRate) + "\n";
178 } 178 }
179 } 179 }
180 return s; 180 return s;
181 } 181 }
549 SparseModel<PointType>::getEndFrame() const 549 SparseModel<PointType>::getEndFrame() const
550 { 550 {
551 QMutexLocker locker(&m_mutex); 551 QMutexLocker locker(&m_mutex);
552 sv_frame_t f = 0; 552 sv_frame_t f = 0;
553 if (!m_points.empty()) { 553 if (!m_points.empty()) {
554 PointListConstIterator i(m_points.end()); 554 PointListConstIterator i(m_points.end());
555 f = (--i)->frame; 555 f = (--i)->frame;
556 } 556 }
557 if (m_extendTo > f) return m_extendTo; 557 if (m_extendTo > f) return m_extendTo;
558 else return f; 558 else return f;
559 } 559 }
560 560