From 670ad9024223534a656c7491683a29d5742c5713 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82?= Date: Sun, 4 Jul 2021 12:18:49 +0200 Subject: [PATCH] Don't trigger middle mouse scrolling if ChannelView is not fully populated (#2933) Co-authored-by: pajlada --- CHANGELOG.md | 1 + src/widgets/helper/ChannelView.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index adc85c9e..29b787e7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - Minor: Added `/openurl` command. Usage: `/openurl `. Opens the provided URL in the browser. (#2461, #2926) - Bugfix: Now deleting cache files that weren't modified in the past 14 days. (#2947) - Bugfix: Fixed large timeout durations in moderation buttons overlapping with usernames or other buttons. (#2865, #2921) +- Bugfix: Middle mouse click no longer scrolls in not fully populated usercards and splits. (#2933) - Bugfix: Fix bad behavior of the HTML color picker edit when user input is being entered. (#2942) ## 2.3.3 diff --git a/src/widgets/helper/ChannelView.cpp b/src/widgets/helper/ChannelView.cpp index da715d35..8986fede 100644 --- a/src/widgets/helper/ChannelView.cpp +++ b/src/widgets/helper/ChannelView.cpp @@ -1622,7 +1622,7 @@ void ChannelView::mousePressEvent(QMouseEvent *event) hoverLayoutElement->getFlags().has( MessageElementFlag::Username)) break; - else + else if (this->scrollBar_->isVisible()) this->enableScrolling(event->screenPos()); } } @@ -1696,7 +1696,7 @@ void ChannelView::mouseReleaseEvent(QMouseEvent *event) } else if (event->button() == Qt::MiddleButton) { - if (this->isScrolling_) + if (this->isScrolling_ && this->scrollBar_->isVisible()) { if (event->screenPos() == this->lastMiddlePressPosition_) this->enableScrolling(event->screenPos());