mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 10:46:35 +01:00
ToolButton: Fix showing both context menu and button menu on right click
This commit is contained in:
parent
3ec6da6103
commit
9fd7c271e4
@ -203,6 +203,15 @@ void ToolButton::mouseDoubleClickEvent(QMouseEvent* e)
|
||||
}
|
||||
}
|
||||
|
||||
void ToolButton::contextMenuEvent(QContextMenuEvent *e)
|
||||
{
|
||||
// Block to prevent showing both context menu and button menu
|
||||
if (menu())
|
||||
return;
|
||||
|
||||
QToolButton::contextMenuEvent(e);
|
||||
}
|
||||
|
||||
void ToolButton::paintEvent(QPaintEvent* e)
|
||||
{
|
||||
if (!(m_options & MultiIconOption)) {
|
||||
|
@ -81,6 +81,7 @@ protected:
|
||||
void mousePressEvent(QMouseEvent* e);
|
||||
void mouseReleaseEvent(QMouseEvent* e);
|
||||
void mouseDoubleClickEvent(QMouseEvent* e);
|
||||
void contextMenuEvent(QContextMenuEvent *e);
|
||||
void paintEvent(QPaintEvent* e);
|
||||
|
||||
private:
|
||||
|
Loading…
Reference in New Issue
Block a user