Only handle left button clicks.

This commit is contained in:
John Preston 2020-01-28 09:32:58 +03:00
parent 0f0fd6a94f
commit 8399f70ea0

View file

@ -91,8 +91,10 @@ void AbstractButton::clicked(
Qt::MouseButton button) { Qt::MouseButton button) {
_modifiers = modifiers; _modifiers = modifiers;
const auto weak = MakeWeak(this); const auto weak = MakeWeak(this);
if (const auto callback = _clickedCallback) { if (button == Qt::LeftButton) {
callback(); if (const auto callback = _clickedCallback) {
callback();
}
} }
if (weak) { if (weak) {
_clicks.fire_copy(button); _clicks.fire_copy(button);