Commit 71e34a6c2107d0a1852cd8921d3b1d3a1b335868
1 parent
edf9cab6
Propagate metadata from first Template in Flatten
Showing
1 changed file
with
2 additions
and
0 deletions
openbr/plugins/misc.cpp
| @@ -554,6 +554,8 @@ class FlattenTransform : public UntrainableMetaTransform | @@ -554,6 +554,8 @@ class FlattenTransform : public UntrainableMetaTransform | ||
| 554 | void project(const TemplateList &src, TemplateList &dst) const | 554 | void project(const TemplateList &src, TemplateList &dst) const |
| 555 | { | 555 | { |
| 556 | Template flat; | 556 | Template flat; |
| 557 | + // let's hope that all Templates belong to the same file | ||
| 558 | + flat.file = src.first().file; | ||
| 557 | foreach (const Template &tmpl, src) | 559 | foreach (const Template &tmpl, src) |
| 558 | flat.append(tmpl); | 560 | flat.append(tmpl); |
| 559 | dst.append(flat); | 561 | dst.append(flat); |