Commit c2b1db42ccae3b34d12c4495772b8b297dabb6b6

Authored by Scott Klum
1 parent 91a1f5e3

getChildren works with Classifiers now

Showing 1 changed file with 11 additions and 0 deletions
openbr/openbr_plugin.cpp
@@ -971,6 +971,17 @@ QList<Object *> Object::getChildren() const @@ -971,6 +971,17 @@ QList<Object *> Object::getChildren() const
971 output.append((Object *) dist); 971 output.append((Object *) dist);
972 } 972 }
973 } 973 }
  974 + else if (variant.canConvert<Classifier *>()) {
  975 + Classifier *classifier = variant.value<Classifier *>();
  976 + if (classifier)
  977 + output.append((Object* ) variant.value<Classifier *>());
  978 + }
  979 + else if (variant.canConvert<QList<Classifier *> >()) {
  980 + foreach (const Classifier *classifier, variant.value<QList<Classifier *> >()) {
  981 + if (classifier)
  982 + output.append((Object *) classifier);
  983 + }
  984 + }
974 } 985 }
975 return output; 986 return output;
976 } 987 }