'if self.tdrWindow.td' throws a ValueError when td is not empty

pull/535/head
mss 2022-09-07 10:37:37 +02:00
rodzic 7baa870e75
commit 9f95d73da6
2 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -256,7 +256,7 @@ class TDRChart(Chart):
return
a0.accept()
width = self.width() - self.leftMargin - self.rightMargin
if len(self.tdrWindow.td) > 0:
if self.tdrWindow.td:
if self.fixedSpan:
max_index = np.searchsorted(self.tdrWindow.distance_axis, self.maxDisplayLength * 2)
min_index = np.searchsorted(self.tdrWindow.distance_axis, self.minDisplayLength * 2)
@ -415,7 +415,7 @@ class TDRChart(Chart):
qp.end()
def valueAtPosition(self, y):
if len(self.tdrWindow.td) > 0:
if self.tdrWindow.td:
height = self.height() - self.topMargin - self.bottomMargin
absy = (self.height() - y) - self.bottomMargin
if self.fixedValues:

Wyświetl plik

@ -34,7 +34,7 @@ class TDRWindow(QtWidgets.QWidget):
super().__init__()
self.app = app
self.td = []
self.td = None
self.distance_axis = []
self.step_response = []
self.step_response_Z = []