Commit 1ea28d66 authored by Dan Pascu's avatar Dan Pascu

Prevent chat session list from scrolling during animations

parent 8f94e2a8
......@@ -1367,6 +1367,7 @@ class ChatWindow(base_class, ui_class, ColorHelperMixin):
self.session_list.animation.setDirection(QPropertyAnimation.Forward)
self.session_list.animation.setStartValue(self.session_widget.geometry())
self.session_list.animation.setEndValue(self.session_panel.rect())
self.session_list.scrollToTop()
self.session_list.show()
self.session_list.animation.start()
......
......@@ -3086,6 +3086,10 @@ class ChatSessionListView(QListView):
def _SH_AnimationFinished(self):
if self.animation.direction() == QPropertyAnimation.Forward:
try:
self.scrollTo(self.selectedIndexes()[0], self.EnsureVisible)
except IndexError:
pass
self.setFocus(Qt.OtherFocusReason)
else:
self.hide()
......
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