mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 02:36:34 +01:00
ButtonWithMenu: Don't show menu on right click
This commit is contained in:
parent
c5b59d1011
commit
09d2a2017d
@ -1,6 +1,6 @@
|
||||
/* ============================================================
|
||||
* Falkon - Qt web browser
|
||||
* Copyright (C) 2010-2017 David Rosca <nowrep@gmail.com>
|
||||
* Copyright (C) 2010-2018 David Rosca <nowrep@gmail.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -165,7 +165,7 @@ void ButtonWithMenu::generateMenu()
|
||||
|
||||
void ButtonWithMenu::mousePressEvent(QMouseEvent *event)
|
||||
{
|
||||
if (parentWidget() && parentWidget()->parentWidget()) {
|
||||
if (event->buttons() == Qt::LeftButton && parentWidget() && parentWidget()->parentWidget()) {
|
||||
emit aboutToShowMenu();
|
||||
QWidget *w = parentWidget()->parentWidget();
|
||||
m_menu->popup(w->mapToGlobal(w->rect().bottomLeft()));
|
||||
|
Loading…
Reference in New Issue
Block a user