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