From 994a0f5c1fb80d0065b8fd3134111ca8790b46bd Mon Sep 17 00:00:00 2001 From: Blaine Date: Tue, 9 Jun 2020 04:53:48 +0530 Subject: conflicted commits --- src/main/python/utils/fileWindow.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/main/python/utils/fileWindow.py') diff --git a/src/main/python/utils/fileWindow.py b/src/main/python/utils/fileWindow.py index 6ad4477..215ebfe 100644 --- a/src/main/python/utils/fileWindow.py +++ b/src/main/python/utils/fileWindow.py @@ -1,5 +1,3 @@ -import json - from PyQt5.QtCore import Qt, pyqtSignal, QPoint from PyQt5.QtGui import QIcon from PyQt5.QtWidgets import (QFileDialog, QHBoxLayout, @@ -11,6 +9,7 @@ from .graphics import customView from .canvas import canvas from .tabs import customTabWidget from .undo import resizeCommand +from .app import dumps, loads, JSON_Typer class fileWindow(QMdiSubWindow): @@ -223,7 +222,7 @@ class fileWindow(QMdiSubWindow): name = QFileDialog.getSaveFileName(self, 'Save File', f'New Diagram', 'Process Flow Diagram (*.pfd)') if not name else name if name[0]: with open(name[0],'w') as file: - json.dump(self.__getstate__(), file, indent=4) + dumps(self, file, indent=4, cls=JSON_Typer) return True else: return False -- cgit From 3ea92365befd56852288fdaac5d551c4b96d269a Mon Sep 17 00:00:00 2001 From: Blaine Date: Tue, 9 Jun 2020 11:08:32 +0530 Subject: 2nd fix --- src/main/python/utils/fileWindow.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/python/utils/fileWindow.py') diff --git a/src/main/python/utils/fileWindow.py b/src/main/python/utils/fileWindow.py index 215ebfe..04ed81a 100644 --- a/src/main/python/utils/fileWindow.py +++ b/src/main/python/utils/fileWindow.py @@ -9,7 +9,7 @@ from .graphics import customView from .canvas import canvas from .tabs import customTabWidget from .undo import resizeCommand -from .app import dumps, loads, JSON_Typer +from .app import dump, loads, JSON_Typer class fileWindow(QMdiSubWindow): @@ -222,7 +222,7 @@ class fileWindow(QMdiSubWindow): name = QFileDialog.getSaveFileName(self, 'Save File', f'New Diagram', 'Process Flow Diagram (*.pfd)') if not name else name if name[0]: with open(name[0],'w') as file: - dumps(self, file, indent=4, cls=JSON_Typer) + dump(self, file, indent=4, cls=JSON_Typer) return True else: return False -- cgit