Skip to content

Commit 843554d

Browse files
committed
UI/Qt: Clear pressed tab when opening a tab context menu
`TabBar::mousePressEvent()` sets `m_pressed_tab` before `TabBar::contextMenuEvent()` is called. If we don't clear it to nullptr, we continue to think that a mouse button is pressed on a tab, which suppresses the tab preview-on-hover. Clearing it to nullptr makes that work again. Fixes #10544
1 parent a7536de commit 843554d

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

UI/Qt/TabBar.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -809,6 +809,7 @@ void TabBar::contextMenuEvent(QContextMenuEvent* event)
809809
if (tab_index < 0)
810810
return;
811811

812+
m_pressed_tab = nullptr;
812813
if (auto* tab = m_tab_widget->tab(tab_index))
813814
tab->context_menu()->exec(event->globalPos());
814815
}

0 commit comments

Comments
 (0)