mirror of
https://github.com/ankitects/anki.git
synced 2025-09-21 07:22:23 -04:00
do nothing if dropPos == idx
since such move won't change the field position and when trying to move the field below itself may lead to it being moved below the next field
This commit is contained in:
parent
6f3ebafc46
commit
ce512014f2
1 changed files with 2 additions and 0 deletions
|
@ -60,6 +60,8 @@ class FieldDialog(QDialog):
|
|||
indicatorPos = fieldList.dropIndicatorPosition()
|
||||
dropPos = fieldList.indexAt(ev.pos()).row()
|
||||
idx = self.currentIdx
|
||||
if dropPos == idx:
|
||||
return
|
||||
if indicatorPos == QAbstractItemView.OnViewport: # to bottom.
|
||||
movePos = fieldList.count() - 1
|
||||
elif indicatorPos == QAbstractItemView.AboveItem:
|
||||
|
|
Loading…
Reference in a new issue