Scroll completion to top when showing it.

See #531.
This commit is contained in:
Florian Bruhin 2015-03-11 07:50:05 +01:00
parent 1b879faf84
commit 0f5391c4fa

View File

@ -243,6 +243,9 @@ class CompletionView(QTreeView):
self._resize_columns()
def showEvent(self, e):
"""Adjust the completion size when it's freshly shown."""
"""Adjust the completion size and scroll when it's freshly shown."""
self.resize_completion.emit()
scrollbar = self.verticalScrollBar()
if scrollbar is not None:
scrollbar.setValue(scrollbar.minimum())
super().showEvent(e)