Don't trigger middle mouse scrolling if ChannelView is not fully populated (#2933)

Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
Paweł 2021-07-04 12:18:49 +02:00 committed by GitHub
parent 804bc526b5
commit 670ad90242
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View file

@ -6,6 +6,7 @@
- Minor: Added `/openurl` command. Usage: `/openurl <URL>`. 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

View file

@ -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());