diff options
Diffstat (limited to 'src/main/python')
-rw-r--r-- | src/main/python/utils/canvas.py | 1 | ||||
-rw-r--r-- | src/main/python/utils/fileWindow.py | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/main/python/utils/canvas.py b/src/main/python/utils/canvas.py index 2b029e0..d1da9bc 100644 --- a/src/main/python/utils/canvas.py +++ b/src/main/python/utils/canvas.py @@ -154,7 +154,6 @@ class canvas(QWidget): graphic, index = shapeGrips[item['startGripItem']] line.setStartGripItem = graphic.lineGripItems[index] graphic.lineGripItems[index].line = line - print("hello2") if item['endGripItem']: graphic, index = shapeGrips[item['endGripItem']] line.setEndGripItem = graphic.lineGripItems[index] diff --git a/src/main/python/utils/fileWindow.py b/src/main/python/utils/fileWindow.py index 04ed81a..8edd38e 100644 --- a/src/main/python/utils/fileWindow.py +++ b/src/main/python/utils/fileWindow.py @@ -3,7 +3,7 @@ from PyQt5.QtGui import QIcon from PyQt5.QtWidgets import (QFileDialog, QHBoxLayout, QMdiSubWindow, QMenu, QPushButton, QSizePolicy, QSplitter, QWidget, QStyle) - +from os import path from . import dialogs from .graphics import customView from .canvas import canvas @@ -221,6 +221,8 @@ class fileWindow(QMdiSubWindow): # called by dialog.saveEvent, saves the current file name = QFileDialog.getSaveFileName(self, 'Save File', f'New Diagram', 'Process Flow Diagram (*.pfd)') if not name else name if name[0]: + self.setObjectName(path.basename(name[0]).split(".")[0]) + self.setWindowTitle(self.objectName()) with open(name[0],'w') as file: dump(self, file, indent=4, cls=JSON_Typer) return True |