catch + and - as sort operator

This commit is contained in:
j 2021-08-09 11:26:00 +02:00
parent e8d47cf369
commit 2566ac6173

View file

@ -76,9 +76,13 @@ def sort_clips(edit, sort):
for clip in clips: for clip in clips:
clip['index'] = idx clip['index'] = idx
idx += 1 idx += 1
reverse = sort.startswith('-') if sort.startswith('+'):
reverse = False
sort = sort[1:]
elif sort.startswith('-'):
reverse = True
sort = sort[1:]
last = '' if reverse else 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' last = '' if reverse else 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
sort = sort.lstrip('-')
if sort == 'manual': if sort == 'manual':
s = clips s = clips
if reverse: if reverse: