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:
BlueGreenMagick 2020-05-26 18:59:53 +09:00
parent 6f3ebafc46
commit ce512014f2

View File

@ -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: