Handle edge case for extreme zoom out

uppx_slice_fix
Tyler Goodlet 2022-06-15 08:58:01 -04:00
parent de970755d7
commit ba43b54175
1 changed files with 6 additions and 1 deletions

View File

@ -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}')