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 3ee66375da
commit 26a8353664

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: