From 84c4f0ff4deacd355a658b5f12e1b07201b14a04 Mon Sep 17 00:00:00 2001 From: David Rosca Date: Mon, 8 Jan 2018 12:46:26 +0100 Subject: [PATCH] TabBar: Don't show context menu when dragging tab Otherwise it breaks tabbar state. --- src/lib/tabwidget/tabbar.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib/tabwidget/tabbar.cpp b/src/lib/tabwidget/tabbar.cpp index 074bebf86..2b2ddd72d 100644 --- a/src/lib/tabwidget/tabbar.cpp +++ b/src/lib/tabwidget/tabbar.cpp @@ -293,6 +293,10 @@ void TabBar::showCloseButton(int index) void TabBar::contextMenuEvent(QContextMenuEvent* event) { + if (isDragInProgress()) { + return; + } + int index = tabAt(event->pos()); TabContextMenu menu(index, Qt::Horizontal, m_window, m_tabWidget);