From 25d9d89aa1dd9b3bd758fb7fa9fac5c7db645641 Mon Sep 17 00:00:00 2001 From: Josh Klontz Date: Sun, 7 Apr 2013 15:01:00 -0400 Subject: [PATCH] csvGallery now returns class string label when available --- openbr/plugins/gallery.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/openbr/plugins/gallery.cpp b/openbr/plugins/gallery.cpp index e950943..e0f699c 100644 --- a/openbr/plugins/gallery.cpp +++ b/openbr/plugins/gallery.cpp @@ -413,7 +413,11 @@ class csvGallery : public Gallery static QString getCSVElement(const QString &key, const QVariant &value, bool header) { - if (value.canConvert()) { + if ((key == "Label") && !header) { + QString stringLabel = Globals->classes.key(value.value()); + if (stringLabel.isEmpty()) return value.value(); + else return stringLabel; + } else if (value.canConvert()) { if (header) return key; else return value.value(); } else if (value.canConvert()) { -- libgit2 0.21.4