summaryrefslogtreecommitdiff
path: root/src/main/python/utils/dialogs.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/python/utils/dialogs.py')
-rw-r--r--src/main/python/utils/dialogs.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/main/python/utils/dialogs.py b/src/main/python/utils/dialogs.py
index 83a5f90..d5522cc 100644
--- a/src/main/python/utils/dialogs.py
+++ b/src/main/python/utils/dialogs.py
@@ -57,7 +57,19 @@ class paperDims(QDialog):
def exec_(self):
#overload exec_ to add return values and delete itself(currently being tested)
super(paperDims, self).exec_()
- return self._canvasSize, self._ppi if self.result==1 else None
+ self.deleteLater()
+ return (self._canvasSize, self._ppi) if self.result() else None
+
+ def accept(self):
+ self.setResult(1)
+ self.accepted.emit()
+ return super(paperDims, self).accept()
+
+ def reject(self):
+ self.setResult(0)
+ self.rejected.emit()
+ return super(paperDims, self).reject()
+
def saveEvent(parent = None):
#utility function to generate a Qt alert window requesting the user to save the file, returns user intention on window close