From 24021ddeb0ffe4d2a26e2a92bd462ffa280365e9 Mon Sep 17 00:00:00 2001 From: LtWorf Date: Thu, 13 Oct 2011 20:39:48 +0000 Subject: [PATCH] - warns about saving relations - no more empty fields git-svn-id: http://galileo.dmi.unict.it/svn/relational/trunk@328 014f5005-505e-4b48-8d0a-63407b615a7c --- relational_gui/creator.py | 6 +++++- relational_gui/maingui.py | 2 +- relational_gui/rel_edit.ui | 7 +++++++ relational_gui/survey.py | 2 +- relational_pyside/maingui.py | 2 +- relational_pyside/survey.py | 2 +- 6 files changed, 16 insertions(+), 5 deletions(-) diff --git a/relational_gui/creator.py b/relational_gui/creator.py index e5a08fd..a32a378 100644 --- a/relational_gui/creator.py +++ b/relational_gui/creator.py @@ -95,7 +95,11 @@ class creatorForm(QtGui.QDialog): for i in range(1,self.table.rowCount()): hlist=[] for j in range(self.table.columnCount()): - hlist.append(compatibility.get_py_str(self.table.item(i,j).text())) + try: + hlist.append(compatibility.get_py_str(self.table.item(i,j).text())) + except: + QtGui.QMessageBox.information(None,QtGui.QApplication.translate("Form", "Error"),QtGui.QApplication.translate("Form", "Unset value in %d,%d!"% (i+1,j+1)) ) + return None r.content.add(tuple(hlist)) return r diff --git a/relational_gui/maingui.py b/relational_gui/maingui.py index 5e4f050..dbf756d 100644 --- a/relational_gui/maingui.py +++ b/relational_gui/maingui.py @@ -2,7 +2,7 @@ # Form implementation generated from reading ui file 'relational_gui/maingui.ui' # -# Created: Thu Oct 13 21:38:18 2011 +# Created: Thu Oct 13 22:31:56 2011 # by: PyQt4 UI code generator 4.8.3 # # WARNING! All changes made in this file will be lost! diff --git a/relational_gui/rel_edit.ui b/relational_gui/rel_edit.ui index 234143c..d6496a4 100644 --- a/relational_gui/rel_edit.ui +++ b/relational_gui/rel_edit.ui @@ -58,6 +58,13 @@ + + + + Remember that new relations and modified relations are not automatically saved + + + diff --git a/relational_gui/survey.py b/relational_gui/survey.py index b9f57f7..eee97cc 100644 --- a/relational_gui/survey.py +++ b/relational_gui/survey.py @@ -2,7 +2,7 @@ # Form implementation generated from reading ui file 'relational_gui/survey.ui' # -# Created: Thu Oct 13 21:38:18 2011 +# Created: Thu Oct 13 22:31:56 2011 # by: PyQt4 UI code generator 4.8.3 # # WARNING! All changes made in this file will be lost! diff --git a/relational_pyside/maingui.py b/relational_pyside/maingui.py index e5b58f5..6d1cc28 100644 --- a/relational_pyside/maingui.py +++ b/relational_pyside/maingui.py @@ -2,7 +2,7 @@ # Form implementation generated from reading ui file 'relational_pyside/maingui.ui' # -# Created: Thu Oct 13 21:38:18 2011 +# Created: Thu Oct 13 22:31:56 2011 # by: pyside-uic 0.2.13 running on PySide 1.0.7 # # WARNING! All changes made in this file will be lost! diff --git a/relational_pyside/survey.py b/relational_pyside/survey.py index 4e6d7bc..e5cdef9 100644 --- a/relational_pyside/survey.py +++ b/relational_pyside/survey.py @@ -2,7 +2,7 @@ # Form implementation generated from reading ui file 'relational_pyside/survey.ui' # -# Created: Thu Oct 13 21:38:18 2011 +# Created: Thu Oct 13 22:31:56 2011 # by: pyside-uic 0.2.13 running on PySide 1.0.7 # # WARNING! All changes made in this file will be lost!