changeset 1109:0a448c947038

frontends: dialog don't crash anymore is no submit_id is given (submit does nothing in this case)
author Goffi <goffi@goffi.org>
date Wed, 20 Aug 2014 21:16:14 +0200
parents 6bdcaeafca11
children 36c1bbb8ca24
files frontends/src/tools/xmlui.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/frontends/src/tools/xmlui.py	Wed Aug 20 21:15:04 2014 +0200
+++ b/frontends/src/tools/xmlui.py	Wed Aug 20 21:16:14 2014 +0200
@@ -161,7 +161,10 @@
         self._xmluiClose()
 
     def _xmluiSubmit(self, data):
-        self._xmlui_parent.submit(data)
+        if self._xmlui_parent.submit_id is None:
+            log.debug(_("Nothing to submit"))
+        else:
+            self._xmlui_parent.submit(data)
 
     def _xmluiSetData(self, status, data):
         pass