Commit f0b9536e authored by Florian Rhiem's avatar Florian Rhiem

Call GRWidget.update() instead of GRWidget.draw()

parent 39a99bca
......@@ -147,7 +147,7 @@ class HistogramWidget(QtWidgets.QWidget):
def keyPressEvent(self, event):
if event.key() == QtCore.Qt.Key_Return \
or event.key() == QtCore.Qt.Key_Enter:
self.draw()
self.update()
def draw(self, now=False, wsviewport=None):
xvalues = None
......@@ -209,7 +209,7 @@ class HistogramWidget(QtWidgets.QWidget):
".", "CSV Files ({})".format(qtext))[0]
if len(filepath) == 0:
return
self.draw()
self.update()
xvalues = self.gr_widget.xvalues
yvalues = self.gr_widget.yvalues
if xvalues is None or yvalues is None:
......@@ -233,7 +233,7 @@ class HistogramWidget(QtWidgets.QWidget):
if self.results != results:
self.results = results
self.gr_widget.setdata(None, None, None, None)
self.gr_widget.draw()
self.gr_widget.update()
self.datasetlabel.setText(str(results))
else:
self.datasetlabel.setText("")
......
......@@ -156,7 +156,7 @@ class PDFWidget(QtWidgets.QWidget):
def keyPressEvent(self, event):
if event.key() == QtCore.Qt.Key_Return \
or event.key() == QtCore.Qt.Key_Enter:
self.draw()
self.update()
def draw(self, now=False, wsviewport=None):
xvalues = None
......@@ -234,7 +234,7 @@ class PDFWidget(QtWidgets.QWidget):
".", "CSV Files ({})".format(qtext))[0]
if len(filepath) == 0:
return
self.draw()
self.update()
xvalues = self.gr_widget.xvalues
yvalues = self.gr_widget.yvalues
if xvalues is None or yvalues is None:
......@@ -261,7 +261,7 @@ class PDFWidget(QtWidgets.QWidget):
self.elem2.clear()
self.elem2.addItems(e)
self.gr_widget.setdata(None, None, None)
self.gr_widget.draw()
self.gr_widget.update()
self.datasetlabel.setText(str(results))
else:
self.datasetlabel.setText("")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment