catch + and - as sort operator
This commit is contained in:
parent
e8d47cf369
commit
2566ac6173
1 changed files with 6 additions and 2 deletions
8
edit.py
8
edit.py
|
@ -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:
|
||||||
|
|
Loading…
Reference in a new issue