Commit addad155 authored by Pielage, Leon's avatar Pielage, Leon

Fixed the behaviour when moving the first/last item up/down in a filtered view...

Fixed the behaviour when moving the first/last item up/down in a filtered view in the host and input manager
parent d3b2b252
......@@ -37,10 +37,13 @@ class ManagerDialog(QWidget):
j = 1
item = self._itemscroll.item(row - j)
# skip hidden items
while i-j >= 0 and item.isHidden():
while i-j > 0 and item.isHidden():
j += 1
item = self._itemscroll.item(row - j)
if not item or item.isHidden():
return
# update dict
tmp = self.dict[subDictName][i]
for k in range(0, j):
......@@ -69,10 +72,13 @@ class ManagerDialog(QWidget):
j = 1
item = self._itemscroll.item(row + j)
# skip hidden items
while i+j <= dictLength and item.isHidden():
while i+j < dictLength and item.isHidden():
j += 1
item = self._itemscroll.item(row + j)
if not item or item.isHidden():
return
# update dict
tmp = self.dict[subDictName][i]
for k in range(0, j):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment