forked from IPKM/nmreval
remove enableAutoRange call to stop unwanted rescales; closes #143
This commit is contained in:
parent
8fb17b22fd
commit
64b270d7c1
@ -167,7 +167,7 @@ class QGraphWindow(QtWidgets.QGraphicsView, Ui_GraphWindow):
|
|||||||
self._block = state
|
self._block = state
|
||||||
|
|
||||||
if not self._block:
|
if not self._block:
|
||||||
self.graphic.enableAutoRange()
|
# self.graphic.enableAutoRange()
|
||||||
self._update_zorder()
|
self._update_zorder()
|
||||||
self.show_legend()
|
self.show_legend()
|
||||||
else:
|
else:
|
||||||
@ -178,6 +178,7 @@ class QGraphWindow(QtWidgets.QGraphicsView, Ui_GraphWindow):
|
|||||||
name = [name]
|
name = [name]
|
||||||
plots = [plots]
|
plots = [plots]
|
||||||
toplevel = len(self.sets)
|
toplevel = len(self.sets)
|
||||||
|
|
||||||
self.listWidget.blockSignals(True)
|
self.listWidget.blockSignals(True)
|
||||||
for (real_plot, imag_plot, err_plot), n in zip(plots, name):
|
for (real_plot, imag_plot, err_plot), n in zip(plots, name):
|
||||||
self.sets.append(n)
|
self.sets.append(n)
|
||||||
@ -463,8 +464,6 @@ class QGraphWindow(QtWidgets.QGraphicsView, Ui_GraphWindow):
|
|||||||
self.plotItem.updateLogMode()
|
self.plotItem.updateLogMode()
|
||||||
self.set_range(x=r[0], y=r[1])
|
self.set_range(x=r[0], y=r[1])
|
||||||
|
|
||||||
self.plotItem.enableAutoRange()
|
|
||||||
|
|
||||||
def enable_picking(self, enabled: bool):
|
def enable_picking(self, enabled: bool):
|
||||||
if enabled:
|
if enabled:
|
||||||
self.scene.sigMouseClicked.connect(self.position_picked)
|
self.scene.sigMouseClicked.connect(self.position_picked)
|
||||||
|
Loading…
Reference in New Issue
Block a user