From 05ed1621031f4e1b23af1fafd54e0990967d6bd9 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 2 Jun 2013 14:32:33 +0300 Subject: improve dropshortcutcontainer. --- src/gui/widgets/dropshortcutcontainer.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/gui/widgets/dropshortcutcontainer.cpp') diff --git a/src/gui/widgets/dropshortcutcontainer.cpp b/src/gui/widgets/dropshortcutcontainer.cpp index aa4e1d829..166b5eaec 100644 --- a/src/gui/widgets/dropshortcutcontainer.cpp +++ b/src/gui/widgets/dropshortcutcontainer.cpp @@ -205,7 +205,8 @@ void DropShortcutContainer::mousePressed(gcn::MouseEvent &event) if (index == -1) return; - if (event.getButton() == gcn::MouseEvent::LEFT) + const int eventButton = event.getButton(); + if (eventButton == gcn::MouseEvent::LEFT) { if (dropShortcut->getItem(index) > 0) { @@ -222,7 +223,7 @@ void DropShortcutContainer::mousePressed(gcn::MouseEvent &event) } } } - else if (event.getButton() == gcn::MouseEvent::RIGHT) + else if (eventButton == gcn::MouseEvent::RIGHT) { const Inventory *const inv = PlayerInfo::getInventory(); if (!inv) @@ -301,7 +302,6 @@ void DropShortcutContainer::mouseMoved(gcn::MouseEvent &event) } } -// Hide ItemTooltip void DropShortcutContainer::mouseExited(gcn::MouseEvent &event A_UNUSED) { if (mItemPopup) -- cgit v1.2.3-70-g09d2