summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-06-02 14:32:33 +0300
committerAndrei Karas <akaras@inbox.ru>2013-06-02 14:32:56 +0300
commit05ed1621031f4e1b23af1fafd54e0990967d6bd9 (patch)
tree63b44243add52716ce3cc56d6441536deb3922f8 /src
parentd720737e3bad76f1e6fe3483688f3534196008ae (diff)
downloadmv-05ed1621031f4e1b23af1fafd54e0990967d6bd9.tar.gz
mv-05ed1621031f4e1b23af1fafd54e0990967d6bd9.tar.bz2
mv-05ed1621031f4e1b23af1fafd54e0990967d6bd9.tar.xz
mv-05ed1621031f4e1b23af1fafd54e0990967d6bd9.zip
improve dropshortcutcontainer.
Diffstat (limited to 'src')
-rw-r--r--src/gui/widgets/dropshortcutcontainer.cpp6
-rw-r--r--src/gui/widgets/dropshortcutcontainer.h2
2 files changed, 4 insertions, 4 deletions
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)
diff --git a/src/gui/widgets/dropshortcutcontainer.h b/src/gui/widgets/dropshortcutcontainer.h
index a7930476d..f8ba7fe07 100644
--- a/src/gui/widgets/dropshortcutcontainer.h
+++ b/src/gui/widgets/dropshortcutcontainer.h
@@ -77,7 +77,7 @@ class DropShortcutContainer final : public ShortcutContainer
void mouseMoved(gcn::MouseEvent &event) override;
- void setWidget2(const Widget2 *const widget);
+ void setWidget2(const Widget2 *const widget) override;
private:
bool mItemClicked;