Commit a450d8a6b3197c5259ddc63814d40263749b8d4c

Authored by Scott Klum
1 parent 2a61948f

Updated checkpoints

openbr/plugins/metadata/checkpoints.cpp
... ... @@ -14,11 +14,18 @@ class CheckPointsTransform : public UntrainableMetadataTransform
14 14 Q_OBJECT
15 15  
16 16 Q_PROPERTY(QList<int> indices READ get_indices WRITE set_indices RESET reset_indices STORED false)
  17 + Q_PROPERTY(int count READ get_count WRITE set_count RESET reset_count STORED false)
17 18 BR_PROPERTY(QList<int>, indices, QList<int>())
  19 + BR_PROPERTY(int, count, 0)
18 20  
19 21 void projectMetadata(const File &src, File &dst) const
20 22 {
21 23 dst = src;
  24 +
  25 + const QList<QPointF> points = src.points();
  26 + if (count && points.size() < count)
  27 + dst.fte = true;
  28 +
22 29 for (int i=0; i<indices.size(); i++)
23 30 if (src.points()[indices[i]] == QPointF(-1,-1)) {
24 31 dst.fte = true;
... ...