From ce512014f29bf6716babe7af1d77b8e08decb481 Mon Sep 17 00:00:00 2001 From: BlueGreenMagick <50060875+BlueGreenMagick@users.noreply.github.com> Date: Tue, 26 May 2020 18:59:53 +0900 Subject: [PATCH] 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 --- qt/aqt/fields.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qt/aqt/fields.py b/qt/aqt/fields.py index f0c6fb03b..ea6652871 100644 --- a/qt/aqt/fields.py +++ b/qt/aqt/fields.py @@ -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: