Handle edge case for extreme zoom out
parent
de970755d7
commit
ba43b54175
|
@ -750,8 +750,13 @@ class Flow(msgspec.Struct): # , frozen=True):
|
||||||
y = y[-uppx:]
|
y = y[-uppx:]
|
||||||
ymn, ymx = y.min(), y.max()
|
ymn, ymx = y.min(), y.max()
|
||||||
# print(f'drawing uppx={uppx} mxmn line: {ymn}, {ymx}')
|
# print(f'drawing uppx={uppx} mxmn line: {ymn}, {ymx}')
|
||||||
|
try:
|
||||||
|
iuppx = x[-uppx]
|
||||||
|
except IndexError:
|
||||||
|
iuppx = x
|
||||||
|
|
||||||
dsg._last_line = QLineF(
|
dsg._last_line = QLineF(
|
||||||
x[-uppx], ymn,
|
iuppx, ymn,
|
||||||
x[-1], ymx,
|
x[-1], ymx,
|
||||||
)
|
)
|
||||||
# print(f'updating DS curve {self.name}')
|
# print(f'updating DS curve {self.name}')
|
||||||
|
|
Loading…
Reference in New Issue