comparison layer/Layer.cpp @ 1423:62e908518c71 single-point

Update to Event api in place of Clipboard points
author Chris Cannam
date Fri, 08 Mar 2019 13:37:30 +0000
parents c8a6fd3f9dff
children c697186a8471
comparison
equal deleted inserted replaced
1422:6f51297a0250 1423:62e908518c71
230 // doing that, would it be better to paste at 5s and 10s or at 10s 230 // doing that, would it be better to paste at 5s and 10s or at 10s
231 // and 20s? We probably don't ever want to do the former, do we? 231 // and 20s? We probably don't ever want to do the former, do we?
232 // We either want to be literal all the way through, or aligned 232 // We either want to be literal all the way through, or aligned
233 // all the way through. 233 // all the way through.
234 234
235 for (Clipboard::PointList::const_iterator i = clip.getPoints().begin(); 235 for (EventVector::const_iterator i = clip.getPoints().begin();
236 i != clip.getPoints().end(); ++i) { 236 i != clip.getPoints().end(); ++i) {
237 237
238 // In principle, we want to know whether the aligned version 238 // In principle, we want to know whether the aligned version
239 // of the reference frame in our layer is the same as the 239 // of the reference frame in our layer is the same as the
240 // source frame contained in the clipboard point. However, 240 // source frame contained in the clipboard point. However,
250 // reference (i.e. having been copied from the reference 250 // reference (i.e. having been copied from the reference
251 // model). 251 // model).
252 252
253 sv_frame_t sourceFrame = i->getFrame(); 253 sv_frame_t sourceFrame = i->getFrame();
254 sv_frame_t referenceFrame = sourceFrame; 254 sv_frame_t referenceFrame = sourceFrame;
255 if (i->haveReferenceFrame()) { 255 if (i->hasReferenceFrame()) {
256 referenceFrame = i->getReferenceFrame(); 256 referenceFrame = i->getReferenceFrame();
257 } 257 }
258 sv_frame_t myMappedFrame = alignToReference(v, sourceFrame); 258 sv_frame_t myMappedFrame = alignToReference(v, sourceFrame);
259 259
260 // cerr << "sourceFrame = " << sourceFrame << ", referenceFrame = " << referenceFrame << " (have = " << i->haveReferenceFrame() << "), myMappedFrame = " << myMappedFrame << endl; 260 // cerr << "sourceFrame = " << sourceFrame << ", referenceFrame = " << referenceFrame << " (have = " << i->hasReferenceFrame() << "), myMappedFrame = " << myMappedFrame << endl;
261 261
262 if (myMappedFrame != referenceFrame) return true; 262 if (myMappedFrame != referenceFrame) return true;
263 } 263 }
264 264
265 return false; 265 return false;