From 80cd45cf0c7c0e79de075050d3ee75b422eedbc2 Mon Sep 17 00:00:00 2001 From: LtWorf Date: Thu, 13 Oct 2011 20:30:06 +0000 Subject: [PATCH] - handles wrong header names git-svn-id: http://galileo.dmi.unict.it/svn/relational/trunk@327 014f5005-505e-4b48-8d0a-63407b615a7c --- relational_gui/creator.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/relational_gui/creator.py b/relational_gui/creator.py index 490333e..e5a08fd 100644 --- a/relational_gui/creator.py +++ b/relational_gui/creator.py @@ -88,7 +88,7 @@ class creatorForm(QtGui.QDialog): header=relation.header(hlist) except Exception, e: QtGui.QMessageBox.information(None,QtGui.QApplication.translate("Form", "Error"),"%s\n%s" % (QtGui.QApplication.translate("Form", "Header error!"),e.__str__()) ) - + return None r=relation.relation() r.header=header @@ -103,7 +103,9 @@ class creatorForm(QtGui.QDialog): self.result_relation=self.create_relation() - QtGui.QDialog.accept(self) + #Doesn't close the window in case of errors + if self.result_relation!=None: + QtGui.QDialog.accept(self) pass def reject(self): self.result_relation=None