Mercurial > hg > svgui
diff layer/ImageLayer.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 | 09d008b5c8f4 |
line wrap: on
line diff
--- a/layer/ImageLayer.cpp Tue Mar 05 10:02:48 2019 +0000 +++ b/layer/ImageLayer.cpp Fri Mar 08 13:37:30 2019 +0000 @@ -811,9 +811,8 @@ for (ImageModel::PointList::iterator i = points.begin(); i != points.end(); ++i) { if (s.contains(i->frame)) { - Clipboard::Point point(i->frame, i->label); - point.setReferenceFrame(alignToReference(v, i->frame)); - to.addPoint(point); + Event point(i->frame, i->label); + to.addPoint(point.withReferenceFrame(alignToReference(v, i->frame))); } } } @@ -823,7 +822,7 @@ { if (!m_model) return false; - const Clipboard::PointList &points = from.getPoints(); + const EventVector &points = from.getPoints(); bool realign = false; @@ -847,11 +846,9 @@ ImageModel::EditCommand *command = new ImageModel::EditCommand(m_model, tr("Paste")); - for (Clipboard::PointList::const_iterator i = points.begin(); + for (EventVector::const_iterator i = points.begin(); i != points.end(); ++i) { - if (!i->haveFrame()) continue; - sv_frame_t frame = 0; if (!realign) { @@ -860,7 +857,7 @@ } else { - if (i->haveReferenceFrame()) { + if (i->hasReferenceFrame()) { frame = i->getReferenceFrame(); frame = alignFromReference(v, frame); } else { @@ -872,9 +869,9 @@ //!!! inadequate - if (i->haveLabel()) { + if (i->hasLabel()) { newPoint.label = i->getLabel(); - } else if (i->haveValue()) { + } else if (i->hasValue()) { newPoint.label = QString("%1").arg(i->getValue()); } else { newPoint.label = tr("New Point");