mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-03-14 10:21:21 +00:00
qt: ignore right click to clear input config button if the button is disabled
This commit is contained in:
parent
49712f8f4e
commit
5cc05d082d
@ -220,7 +220,7 @@ bool basic_mouse_settings_dialog::eventFilter(QObject* object, QEvent* event)
|
||||
if (m_button_id < 0)
|
||||
{
|
||||
QMouseEvent* mouse_event = static_cast<QMouseEvent*>(event);
|
||||
if (const auto button = qobject_cast<QPushButton*>(object); button && mouse_event->button() == Qt::RightButton)
|
||||
if (const auto button = qobject_cast<QPushButton*>(object); button && button->isEnabled() && mouse_event->button() == Qt::RightButton)
|
||||
{
|
||||
if (const int button_id = m_buttons->id(button))
|
||||
{
|
||||
|
@ -1026,7 +1026,7 @@ bool pad_settings_dialog::eventFilter(QObject* object, QEvent* event)
|
||||
if (m_button_id == button_ids::id_pad_begin)
|
||||
{
|
||||
QMouseEvent* mouse_event = static_cast<QMouseEvent*>(event);
|
||||
if (const auto button = qobject_cast<QPushButton*>(object); button && mouse_event->button() == Qt::RightButton)
|
||||
if (const auto button = qobject_cast<QPushButton*>(object); button && button->isEnabled() && mouse_event->button() == Qt::RightButton)
|
||||
{
|
||||
if (const int button_id = m_pad_buttons->id(button); m_cfg_entries.contains(button_id))
|
||||
{
|
||||
|
@ -362,7 +362,7 @@ bool raw_mouse_settings_dialog::eventFilter(QObject* object, QEvent* event)
|
||||
if (m_button_id < 0 && !m_disable_mouse_release_event)
|
||||
{
|
||||
QMouseEvent* mouse_event = static_cast<QMouseEvent*>(event);
|
||||
if (const auto button = qobject_cast<QPushButton*>(object); button && mouse_event->button() == Qt::RightButton)
|
||||
if (const auto button = qobject_cast<QPushButton*>(object); button && button->isEnabled() && mouse_event->button() == Qt::RightButton)
|
||||
{
|
||||
if (const int button_id = m_buttons->id(button); button_id >= 0)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user