summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/emoteshortcutcontainer.cpp33
1 files changed, 18 insertions, 15 deletions
diff --git a/src/gui/widgets/emoteshortcutcontainer.cpp b/src/gui/widgets/emoteshortcutcontainer.cpp
index 6df0cd398..7d15ba4a2 100644
--- a/src/gui/widgets/emoteshortcutcontainer.cpp
+++ b/src/gui/widgets/emoteshortcutcontainer.cpp
@@ -192,24 +192,27 @@ void EmoteShortcutContainer::mouseDragged(MouseEvent &restrict event A_UNUSED)
void EmoteShortcutContainer::mousePressed(MouseEvent &restrict event) restrict2
{
- if (!emoteShortcut)
- return;
+ if (event.getButton() == MouseButton::LEFT)
+ {
+ if (!emoteShortcut)
+ return;
- const int index = getIndexFromGrid(event.getX(), event.getY());
+ const int index = getIndexFromGrid(event.getX(), event.getY());
- if (index == -1)
- return;
+ if (index == -1)
+ return;
- event.consume();
- // Stores the selected emote if there is one.
- if (emoteShortcut->isEmoteSelected())
- {
- emoteShortcut->setEmote(index);
- emoteShortcut->setEmoteSelected(0);
- }
- else if (emoteShortcut->getEmote(index))
- {
- mEmoteClicked = true;
+ event.consume();
+ // Stores the selected emote if there is one.
+ if (emoteShortcut->isEmoteSelected())
+ {
+ emoteShortcut->setEmote(index);
+ emoteShortcut->setEmoteSelected(0);
+ }
+ else if (emoteShortcut->getEmote(index))
+ {
+ mEmoteClicked = true;
+ }
}
}