Commit a65a90b222d49213b8e7b97faf846cb087365c43

Authored by Scott Klum
1 parent 2aba0aa2

Don't overwrite points/rects on a dup. instead, append them.

Showing 1 changed file with 6 additions and 2 deletions
openbr/openbr_plugin.cpp
... ... @@ -81,8 +81,10 @@ QString File::hash() const
81 81  
82 82 void File::append(const QVariantMap &metadata)
83 83 {
84   - foreach (const QString &key, metadata.keys())
85   - set(key, metadata[key]);
  84 + foreach (const QString &key, metadata.keys()) {
  85 + if (key != "Points" && key != "Rects")
  86 + set(key, metadata[key]);
  87 + }
86 88 }
87 89  
88 90 void File::append(const File &other)
... ... @@ -96,6 +98,8 @@ void File::append(const File &other)
96 98 }
97 99 }
98 100 append(other.m_metadata);
  101 + appendPoints(other.points());
  102 + appendRects(other.rects());
99 103 }
100 104  
101 105 QList<File> File::split() const
... ...