diff --git a/openbr/openbr_plugin.cpp b/openbr/openbr_plugin.cpp index 1ae0209..7c29cda 100644 --- a/openbr/openbr_plugin.cpp +++ b/openbr/openbr_plugin.cpp @@ -111,7 +111,11 @@ QList File::split(const QString &separator) const QList files; foreach (const QString &word, name.split(separator, QString::SkipEmptyParts)) { File file(word); - file.append(m_metadata); + // If file metadata is empty after this constructor, it means that this is the + // file corresponding to *this.m_metadata, so we append its metadata to get + // the correct functionality + if (file.m_metadata.isEmpty()) + file.append(m_metadata); files.append(file); } return files; @@ -764,7 +768,7 @@ QStringList Object::prunedArguments(bool expanded) const const char *name = metaObject()->property(i).name(); QVariant defaultVal = shellObject->property(name); - + if (defaultVal != property(name)) arguments.append(name + QString("=") + argument(i, expanded)); } diff --git a/openbr/plugins/metadata/checkpoints.cpp b/openbr/plugins/metadata/checkpoints.cpp index 4500490..3f03f61 100644 --- a/openbr/plugins/metadata/checkpoints.cpp +++ b/openbr/plugins/metadata/checkpoints.cpp @@ -14,11 +14,18 @@ class CheckPointsTransform : public UntrainableMetadataTransform Q_OBJECT Q_PROPERTY(QList indices READ get_indices WRITE set_indices RESET reset_indices STORED false) + Q_PROPERTY(int count READ get_count WRITE set_count RESET reset_count STORED false) BR_PROPERTY(QList, indices, QList()) + BR_PROPERTY(int, count, 0) void projectMetadata(const File &src, File &dst) const { dst = src; + + const QList points = src.points(); + if (count && points.size() < count) + dst.fte = true; + for (int i=0; i