From 153775198f2ab71a9e41ac3dee2f42a6561b17aa Mon Sep 17 00:00:00 2001 From: BruebachL <44814898+BruebachL@users.noreply.github.com> Date: Mon, 2 Nov 2026 18:18:07 +0100 Subject: [PATCH] Update card_database_visual_view.cpp --- .../visual_database_display/card_database_visual_view.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/cockatrice/src/interface/widgets/visual_database_display/card_database_visual_view.cpp b/cockatrice/src/interface/widgets/visual_database_display/card_database_visual_view.cpp index d8e1ce94f..a8262c75a 100644 --- a/cockatrice/src/interface/widgets/visual_database_display/card_database_visual_view.cpp +++ b/cockatrice/src/interface/widgets/visual_database_display/card_database_visual_view.cpp @@ -130,11 +130,9 @@ void CardDatabaseVisualView::wheelEvent(QWheelEvent *event) return; } - // Whether the scroll bar is shown says nothing about whether the grid can - // scroll: macOS uses transient (overlay) scroll bars that hide themselves - // once they fade out, and Qt hides the widget for good when that happens. - // The range is the real answer; ignoring the wheel when there is nothing to - // scroll still lets an enclosing scroll area take over. + // macOS uses transient (overlay) scroll bars that hide themselves + // once they fade out, so we need to use the range to determine if we ignore the wheel when there is nothing to + // scroll. This lets an enclosing scroll area take over. QScrollBar *bar = verticalScrollBar(); if (bar->maximum() <= bar->minimum()) { event->ignore();