From 2d5481919e2030ad66183b0bea8f9702d5f8a2db Mon Sep 17 00:00:00 2001 From: Blaine Date: Sat, 25 Apr 2020 09:13:05 +0530 Subject: fixed new tab button --- src/main/python/utils/canvas.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/main/python/utils/canvas.py') 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() -- cgit