From 347565089925dd3b5bdd16b109eda712f9b3b68a Mon Sep 17 00:00:00 2001 From: Dominik Demuth Date: Tue, 1 Aug 2023 18:06:33 +0200 Subject: [PATCH] signal b/w change in graph was not connected --- src/gui_qt/graphs/graphwindow.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui_qt/graphs/graphwindow.py b/src/gui_qt/graphs/graphwindow.py index 7796b81..e3e19a8 100644 --- a/src/gui_qt/graphs/graphwindow.py +++ b/src/gui_qt/graphs/graphwindow.py @@ -75,6 +75,8 @@ class QGraphWindow(QtWidgets.QGraphicsView, Ui_GraphWindow): self.scene.contextMenu[0].disconnect() self.scene.contextMenu[0].triggered.connect(self.export_dialog) + self.bwbutton.toggled.connect(self.change_background) + def _init_gui(self): self.setWindowTitle('Graph ' + str(next(QGraphWindow.counter))) @@ -772,7 +774,6 @@ class QGraphWindow(QtWidgets.QGraphicsView, Ui_GraphWindow): if y is not None: self.plotItem.setLabel('left', y, **{'font-size': '10pt', 'color': self._fgcolor.name()}) - @QtCore.pyqtSlot(bool, name='on_bwbutton_toggled') def change_background(self, _): temp = self._fgcolor, self._bgcolor self.set_color(foreground=self._prev_colors[0], background=self._prev_colors[1])