Scroll to first item when wrapping completion
This commit is contained in:
parent
57604ad8e4
commit
b04adca059
@ -163,7 +163,9 @@ class CompletionView(QTreeView):
|
|||||||
if not idx.isValid() and upwards:
|
if not idx.isValid() and upwards:
|
||||||
return self._model.last_item()
|
return self._model.last_item()
|
||||||
elif not idx.isValid() and not upwards:
|
elif not idx.isValid() and not upwards:
|
||||||
return self._model.first_item()
|
idx = self._model.first_item()
|
||||||
|
self.scrollTo(idx.parent())
|
||||||
|
return idx
|
||||||
elif idx.parent().isValid():
|
elif idx.parent().isValid():
|
||||||
# Item is a real item, not a category header -> success
|
# Item is a real item, not a category header -> success
|
||||||
return idx
|
return idx
|
||||||
|
Loading…
Reference in New Issue
Block a user