Skip to content

Commit

Permalink
Merge pull request #561 from Sjoerd1993/fix-shift-on-single-item
Browse files Browse the repository at this point in the history
Fix shift with single item
  • Loading branch information
sstendahl authored Oct 30, 2023
2 parents 230457f + c9f4f0c commit 80f0793
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def shift(item, xdata, ydata, left_scale, right_scale, items, ranges):

for index, item_ in enumerate(data_list):
# Compare first element with itself, not "previous" item
index = 1 if index == 0 else index
index = 1 if index == 0 and len(data_list) > 1 else index

previous_item = data_list[index - 1]

Expand Down

0 comments on commit 80f0793

Please sign in to comment.