1
0
forked from IPKM/nmreval

signal b/w change in graph was not connected

This commit is contained in:
Dominik Demuth 2023-08-01 18:06:33 +02:00
parent 0eca306ebe
commit 3475650899

View File

@ -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])