mirror of
https://github.com/ankitects/anki.git
synced 2025-09-21 07:22:23 -04:00
fixed move down
This commit is contained in:
parent
01e6470c2a
commit
b5e76f78cb
1 changed files with 2 additions and 5 deletions
|
@ -166,8 +166,6 @@ class Models(QDialog):
|
||||||
|
|
||||||
def moveCardUp(self):
|
def moveCardUp(self):
|
||||||
row = self.form.cardList.currentRow()
|
row = self.form.cardList.currentRow()
|
||||||
if row == -1:
|
|
||||||
return
|
|
||||||
if row == 0:
|
if row == 0:
|
||||||
return
|
return
|
||||||
self.mw.progress.start()
|
self.mw.progress.start()
|
||||||
|
@ -177,10 +175,9 @@ class Models(QDialog):
|
||||||
|
|
||||||
def moveCardDown(self):
|
def moveCardDown(self):
|
||||||
row = self.form.cardList.currentRow()
|
row = self.form.cardList.currentRow()
|
||||||
if row == -1:
|
if row == len(self.model.templates) - 1:
|
||||||
return
|
|
||||||
if row == len(self.model.cardModels) - 1:
|
|
||||||
return
|
return
|
||||||
|
self.mw.progress.start()
|
||||||
self.model.moveTemplate(self.template, row+1)
|
self.model.moveTemplate(self.template, row+1)
|
||||||
self.mw.progress.finish()
|
self.mw.progress.finish()
|
||||||
self.updateCards()
|
self.updateCards()
|
||||||
|
|
Loading…
Reference in a new issue