forked from IPKM/nmreval
signal b/w change in graph was not connected
This commit is contained in:
parent
0eca306ebe
commit
3475650899
@ -75,6 +75,8 @@ class QGraphWindow(QtWidgets.QGraphicsView, Ui_GraphWindow):
|
|||||||
self.scene.contextMenu[0].disconnect()
|
self.scene.contextMenu[0].disconnect()
|
||||||
self.scene.contextMenu[0].triggered.connect(self.export_dialog)
|
self.scene.contextMenu[0].triggered.connect(self.export_dialog)
|
||||||
|
|
||||||
|
self.bwbutton.toggled.connect(self.change_background)
|
||||||
|
|
||||||
def _init_gui(self):
|
def _init_gui(self):
|
||||||
self.setWindowTitle('Graph ' + str(next(QGraphWindow.counter)))
|
self.setWindowTitle('Graph ' + str(next(QGraphWindow.counter)))
|
||||||
|
|
||||||
@ -772,7 +774,6 @@ class QGraphWindow(QtWidgets.QGraphicsView, Ui_GraphWindow):
|
|||||||
if y is not None:
|
if y is not None:
|
||||||
self.plotItem.setLabel('left', y, **{'font-size': '10pt', 'color': self._fgcolor.name()})
|
self.plotItem.setLabel('left', y, **{'font-size': '10pt', 'color': self._fgcolor.name()})
|
||||||
|
|
||||||
@QtCore.pyqtSlot(bool, name='on_bwbutton_toggled')
|
|
||||||
def change_background(self, _):
|
def change_background(self, _):
|
||||||
temp = self._fgcolor, self._bgcolor
|
temp = self._fgcolor, self._bgcolor
|
||||||
self.set_color(foreground=self._prev_colors[0], background=self._prev_colors[1])
|
self.set_color(foreground=self._prev_colors[0], background=self._prev_colors[1])
|
||||||
|
Loading…
Reference in New Issue
Block a user