From 0eb0a4be7760f33e4487f6279cad83ead5c4be4a Mon Sep 17 00:00:00 2001 From: Dominik Demuth Date: Thu, 26 Jan 2023 19:30:39 +0100 Subject: [PATCH] saving removes bad characters --- src/gui_qt/graphs/graphwindow.py | 6 +++--- src/gui_qt/main/mainwindow.py | 13 ++++++++----- src/gui_qt/main/management.py | 7 ++++++- 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/src/gui_qt/graphs/graphwindow.py b/src/gui_qt/graphs/graphwindow.py index 581efbc..029d9ff 100644 --- a/src/gui_qt/graphs/graphwindow.py +++ b/src/gui_qt/graphs/graphwindow.py @@ -578,16 +578,16 @@ class QGraphWindow(QtWidgets.QGraphicsView, Ui_GraphWindow): if suffix == '.pdf': from ..io.exporters import PDFPrintExporter - PDFPrintExporter(self.graphic).export(outfile) + PDFPrintExporter(self.graphic).export(str(outfile)) elif suffix == '.svg': from pyqtgraph.exporters import SVGExporter - SVGExporter(self.scene).export(outfile) + SVGExporter(self.scene).export(str(outfile)) else: from pyqtgraph.exporters import ImageExporter - ImageExporter(self.scene).export(outfile) + ImageExporter(self.scene).export(str(outfile)) self.set_color(foreground=fg_color, background=bg_color) diff --git a/src/gui_qt/main/mainwindow.py b/src/gui_qt/main/mainwindow.py index a4fa995..0d63dcf 100644 --- a/src/gui_qt/main/mainwindow.py +++ b/src/gui_qt/main/mainwindow.py @@ -114,7 +114,7 @@ class NMRMainWindow(QtWidgets.QMainWindow, Ui_BaseWindow): self.datawidget.management = self.management self.integralwidget.management = self.management - # self.drawingswidget.graphs = self.management.graphs + self.drawingswidget.graphs = self.management.graphs self.ac_group = QtWidgets.QActionGroup(self) self.ac_group.addAction(self.action_lm_fit) @@ -126,8 +126,6 @@ class NMRMainWindow(QtWidgets.QMainWindow, Ui_BaseWindow): self.ac_group2.addAction(self.action_x_range) self.ac_group2.addAction(self.action_custom_range) - self.action_draw_object.setVisible(False) - def _init_signals(self): self.actionRedo = self.management.undostack.createRedoAction(self) icon = QtGui.QIcon.fromTheme("edit-redo") @@ -268,6 +266,10 @@ class NMRMainWindow(QtWidgets.QMainWindow, Ui_BaseWindow): param_outfile = re.sub('[_\s-]?