From ec6e08e70caee652a27f4dcdc01bd992e7157d3f Mon Sep 17 00:00:00 2001 From: Josh Klontz Date: Tue, 24 Jun 2014 13:41:41 -0400 Subject: [PATCH] Have Cascade propagate empty templates when enrollAll is false, for #207 --- openbr/plugins/cascade.cpp | 7 +++++++ 1 file changed, 7 insertions(+), 0 deletions(-) diff --git a/openbr/plugins/cascade.cpp b/openbr/plugins/cascade.cpp index 218b031..d91ac89 100644 --- a/openbr/plugins/cascade.cpp +++ b/openbr/plugins/cascade.cpp @@ -379,6 +379,13 @@ class CascadeTransform : public MetaTransform foreach (const Template &t, src) { const bool enrollAll = t.file.getBool("enrollAll"); + // Mirror the behavior of ExpandTransform in the special case + // of an empty template. + if (t.empty() && !enrollAll) { + dst.append(t); + continue; + } + for (int i=0; i rects; -- libgit2 0.21.4