changeset 2367:9878635586f3

template (xmlui): added values property to be able to use always values even when there is only one value
author Goffi <goffi@goffi.org>
date Sun, 01 Oct 2017 12:21:23 +0200
parents c7a7e650ac2f
children 3865a772c360
files src/tools/common/template_xmlui.py
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/tools/common/template_xmlui.py	Sun Oct 01 12:21:23 2017 +0200
+++ b/src/tools/common/template_xmlui.py	Sun Oct 01 12:21:23 2017 +0200
@@ -49,6 +49,10 @@
         super(ValueWidget, self).__init__(xmlui_parent)
         self.value = value
 
+    @property
+    def values(self):
+        return [self.value]
+
 
 class InputWidget(ValueWidget):