diff options
author | Blaine | 2020-04-25 09:13:05 +0530 |
---|---|---|
committer | Blaine | 2020-04-25 09:13:05 +0530 |
commit | 2d5481919e2030ad66183b0bea8f9702d5f8a2db (patch) | |
tree | f76157b165fb04ce8cb4cb823738f8852b1b6d1d /src/main/python/utils/canvas.py | |
parent | f7ff2e807ff15b1a29093203f7e744810de94435 (diff) | |
download | Chemical-PFD-2d5481919e2030ad66183b0bea8f9702d5f8a2db.tar.gz Chemical-PFD-2d5481919e2030ad66183b0bea8f9702d5f8a2db.tar.bz2 Chemical-PFD-2d5481919e2030ad66183b0bea8f9702d5f8a2db.zip |
fixed new tab button
Diffstat (limited to 'src/main/python/utils/canvas.py')
-rw-r--r-- | src/main/python/utils/canvas.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main/python/utils/canvas.py b/src/main/python/utils/canvas.py index 9578b1a..fe5b527 100644 --- a/src/main/python/utils/canvas.py +++ b/src/main/python/utils/canvas.py @@ -73,6 +73,7 @@ class canvas(QWidget): def adjustCanvasDialog(self): dialogBox = QDialog(self) + dialogBox.setWindowTitle(self.objectName()+":Canvas Size") dialogBoxLayout = QFormLayout(dialogBox) sizeComboBox = QComboBox() sizeComboBox.addItems(sheetDimensionList) @@ -94,7 +95,7 @@ class canvas(QWidget): dialogBoxLayout.setWidget(1, QFormLayout.FieldRole, ppiComboBox) dialogBox.setLayout(dialogBoxLayout) - dialogBox.show() + dialogBox.exec_() def __getstate__(self) -> dict: return { @@ -126,7 +127,7 @@ class fileWindow(QMdiSubWindow): self.tabber.setObjectName(title) self.tabber.tabCloseRequested.connect(self.closeTab) self.tabber.currentChanged.connect(self.changeTab) - self.tabber.tab.plusClicked.connect(self.newDiagram) + self.tabber.plusClicked.connect(self.newDiagram) self.setWidget(self.tabber) self.setWindowTitle(title) @@ -208,7 +209,7 @@ class fileWindow(QMdiSubWindow): return False def closeEvent(self, event): - if self.saveEvent(): + if self.tabCount or self.saveEvent(): event.accept() else: event.ignore() |