diff options
author | Jared Adams <jaxad0127@gmail.com> | 2010-03-01 20:41:41 -0700 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2010-03-01 20:46:17 -0700 |
commit | 76b306a5a2eff9f9a6bb65b3d784cc8e31ba6cce (patch) | |
tree | 7a7c43fb950add7ab991459cf91af23c02cb4309 /src/gui/viewport.cpp | |
parent | 67e678094b9fddd21fb3c690130e772937ab2746 (diff) | |
download | mana-76b306a5a2eff9f9a6bb65b3d784cc8e31ba6cce.tar.gz mana-76b306a5a2eff9f9a6bb65b3d784cc8e31ba6cce.tar.bz2 mana-76b306a5a2eff9f9a6bb65b3d784cc8e31ba6cce.tar.xz mana-76b306a5a2eff9f9a6bb65b3d784cc8e31ba6cce.zip |
Simplify BeignPopup and therefore Viewport
Diffstat (limited to 'src/gui/viewport.cpp')
-rw-r--r-- | src/gui/viewport.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp index 99053339..a36f91cf 100644 --- a/src/gui/viewport.cpp +++ b/src/gui/viewport.cpp @@ -58,8 +58,7 @@ Viewport::Viewport(): mPixelViewY(0.0f), mShowDebugPath(false), mPlayerFollowMouse(false), - mLocalWalkTime(-1), - mBeingPopup(0) + mLocalWalkTime(-1) { setOpaque(false); addMouseListener(this); @@ -75,6 +74,7 @@ Viewport::Viewport(): viewport = this; mPopupMenu = new PopupMenu; + mBeingPopup = new BeingPopup; setFocusable(true); } @@ -91,9 +91,6 @@ void Viewport::setMap(Map *map) map->setDebugFlags(mMap->getDebugFlags()); } mMap = map; - - if (!mBeingPopup) - mBeingPopup = new BeingPopup; } extern MiniStatusWindow *miniStatusWindow; @@ -523,8 +520,7 @@ void Viewport::toggleDebugPath() void Viewport::hideBeingPopup() { - if (mBeingPopup) - mBeingPopup->setVisible(false); + mBeingPopup->setVisible(false); } void Viewport::scheduleDelete(gcn::Widget *widget) |