summaryrefslogtreecommitdiff
path: root/src/gui/viewport.cpp
diff options
context:
space:
mode:
authorEugenio Favalli <elvenprogrammer@gmail.com>2007-08-14 12:11:11 +0000
committerEugenio Favalli <elvenprogrammer@gmail.com>2007-08-14 12:11:11 +0000
commit6c93c10b145d6dd619180bdade5eb9c9392996f1 (patch)
treebe08d79941509d2f97c3ffae6bea2ab4db3affbc /src/gui/viewport.cpp
parent4c15cf97659186bd5ee87068466b498b07ff3182 (diff)
downloadmana-6c93c10b145d6dd619180bdade5eb9c9392996f1.tar.gz
mana-6c93c10b145d6dd619180bdade5eb9c9392996f1.tar.bz2
mana-6c93c10b145d6dd619180bdade5eb9c9392996f1.tar.xz
mana-6c93c10b145d6dd619180bdade5eb9c9392996f1.zip
Fixed popup menu requiring one more click after being used.
Diffstat (limited to 'src/gui/viewport.cpp')
-rw-r--r--src/gui/viewport.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp
index c1a904f5..6c89d107 100644
--- a/src/gui/viewport.cpp
+++ b/src/gui/viewport.cpp
@@ -55,8 +55,7 @@ Viewport::Viewport():
mCameraX(0),
mCameraY(0),
mShowDebugPath(false),
- mPlayerFollowMouse(false),
- mPopupActive(false)
+ mPlayerFollowMouse(false)
{
setOpaque(false);
addMouseListener(this);
@@ -383,10 +382,9 @@ Viewport::mousePressed(gcn::MouseEvent &event)
}
// If a popup is active, just remove it
- if (mPopupActive)
+ if (mPopupMenu->isVisible())
{
mPopupMenu->setVisible(false);
- mPopupActive = false;
return;
}
@@ -473,21 +471,18 @@ void
Viewport::showPopup(int x, int y, Item *item)
{
mPopupMenu->showPopup(x, y, item);
- mPopupActive = true;
}
void
Viewport::showPopup(int x, int y, FloorItem *floorItem)
{
mPopupMenu->showPopup(x, y, floorItem);
- mPopupActive = true;
}
void
Viewport::showPopup(int x, int y, Being *being)
{
mPopupMenu->showPopup(x, y, being);
- mPopupActive = true;
}
void