Don't jump by scroll events in stories viewer.

This commit is contained in:
John Preston 2023-07-26 12:01:53 +04:00
parent 3654c197a9
commit ce39431beb
1 changed files with 3 additions and 2 deletions

View File

@ -5065,8 +5065,9 @@ void OverlayWidget::handleKeyPress(not_null<QKeyEvent*> e) {
void OverlayWidget::handleWheelEvent(not_null<QWheelEvent*> e) {
constexpr auto step = int(QWheelEvent::DefaultDeltasPerStep);
const auto acceptForJump = (e->source() == Qt::MouseEventNotSynthesized)
|| (e->source() == Qt::MouseEventSynthesizedBySystem);
const auto acceptForJump = !_stories
&& ((e->source() == Qt::MouseEventNotSynthesized)
|| (e->source() == Qt::MouseEventSynthesizedBySystem));
_verticalWheelDelta += e->angleDelta().y();
while (qAbs(_verticalWheelDelta) >= step) {
if (_verticalWheelDelta < 0) {