From 125c7aba09cea4ce0f7a1e0106e4eec0f1aa8c9f Mon Sep 17 00:00:00 2001 From: Elvis Angelaccio Date: Tue, 15 Dec 2020 22:56:06 +0100 Subject: [PATCH 1/2] DolphinContextMenu: drop wrong assert `m_context` can also be `SearchContext` or `TimelineContext`, so this assert has been wrong since 8b0c12a59ccb23f. --- src/dolphincontextmenu.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/dolphincontextmenu.cpp b/src/dolphincontextmenu.cpp index 283f525650..91e9d8238d 100644 --- a/src/dolphincontextmenu.cpp +++ b/src/dolphincontextmenu.cpp @@ -103,7 +103,6 @@ DolphinContextMenu::Command DolphinContextMenu::open() } else if (m_context & ItemContext) { openItemContextMenu(); } else { - Q_ASSERT(m_context == NoContext); openViewportContextMenu(); } From 303740c68af83f45be1bdea56a250397a83efa6a Mon Sep 17 00:00:00 2001 From: Eduard Manta Date: Tue, 22 Dec 2020 22:16:52 +0000 Subject: [PATCH 2/2] Fix vertical scroll with horizontal component not being recognized properly BUG: 430532 a scroll that includes an horizontal component != 0 might still be a vertical scroll --- src/kitemviews/kitemlistcontainer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/kitemviews/kitemlistcontainer.cpp b/src/kitemviews/kitemlistcontainer.cpp index 77847bcc79..f253cda539 100644 --- a/src/kitemviews/kitemlistcontainer.cpp +++ b/src/kitemviews/kitemlistcontainer.cpp @@ -172,8 +172,8 @@ void KItemListContainer::wheelEvent(QWheelEvent* event) return; } - const bool scrollHorizontally = (event->angleDelta().x() != 0) || - (event->angleDelta().y() != 0 && !verticalScrollBar()->isVisible()); + const bool scrollHorizontally = (qAbs(event->angleDelta().y()) < qAbs(event->angleDelta().x())) || + (!verticalScrollBar()->isVisible()); KItemListSmoothScroller* smoothScroller = scrollHorizontally ? m_horizontalSmoothScroller : m_verticalSmoothScroller;