summaryrefslogtreecommitdiff
path: root/src/gui/popups/popupmenu.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-03-14 18:47:16 +0300
committerAndrei Karas <akaras@inbox.ru>2017-03-14 18:47:16 +0300
commitd16122cae03202761d75384388f52ca084f91ea4 (patch)
tree921af804051de49732426182b877580a2cba90b6 /src/gui/popups/popupmenu.cpp
parent596436645bef0b41f448e6d7b501a1fc2c5b1fc6 (diff)
downloadmanaverse-d16122cae03202761d75384388f52ca084f91ea4.tar.gz
manaverse-d16122cae03202761d75384388f52ca084f91ea4.tar.bz2
manaverse-d16122cae03202761d75384388f52ca084f91ea4.tar.xz
manaverse-d16122cae03202761d75384388f52ca084f91ea4.zip
Fix shadow variables in PopupMenu and Desktop.
Diffstat (limited to 'src/gui/popups/popupmenu.cpp')
-rw-r--r--src/gui/popups/popupmenu.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp
index 846c29174..913ebdeba 100644
--- a/src/gui/popups/popupmenu.cpp
+++ b/src/gui/popups/popupmenu.cpp
@@ -115,7 +115,7 @@ PopupMenu::PopupMenu() :
mMapItem(nullptr),
mTab(nullptr),
mSpell(nullptr),
- mWindow(nullptr),
+ mCallerWindow(nullptr),
mRenameListener(),
mPlayerListener(),
mDialog(nullptr),
@@ -733,7 +733,7 @@ void PopupMenu::showMapPopup(const int x, const int y,
mY = y2;
if (isMinimap)
- mWindow = minimap;
+ mCallerWindow = minimap;
mBrowserBox->clearRows();
@@ -776,7 +776,7 @@ void PopupMenu::showOutfitsWindowPopup(const int x, const int y)
{
mX = x;
mY = y;
- mWindow = outfitWindow;
+ mCallerWindow = outfitWindow;
mBrowserBox->clearRows();
@@ -838,7 +838,7 @@ void PopupMenu::showChatPopup(const int x, const int y, ChatTab *const tab)
mTab = tab;
mX = x;
mY = y;
- mWindow = chatWindow;
+ mCallerWindow = chatWindow;
mBrowserBox->clearRows();
@@ -1078,7 +1078,7 @@ void PopupMenu::showWindowPopup(Window *const window)
return;
setMousePos();
- mWindow = window;
+ mCallerWindow = window;
mBrowserBox->clearRows();
// TRANSLATORS: popup menu header
mBrowserBox->addRow(_("window"));
@@ -1478,20 +1478,20 @@ void PopupMenu::handleLink(const std::string &link,
showPlayerMenu();
return;
}
- else if (link == "window close" && mWindow)
+ else if (link == "window close" && mCallerWindow)
{
- if (Widget::widgetExists(mWindow))
- mWindow->close();
+ if (Widget::widgetExists(mCallerWindow))
+ mCallerWindow->close();
}
- else if (link == "window unlock" && mWindow)
+ else if (link == "window unlock" && mCallerWindow)
{
- if (Widget::widgetExists(mWindow))
- mWindow->setSticky(false);
+ if (Widget::widgetExists(mCallerWindow))
+ mCallerWindow->setSticky(false);
}
- else if (link == "window lock" && mWindow)
+ else if (link == "window lock" && mCallerWindow)
{
- if (Widget::widgetExists(mWindow))
- mWindow->setSticky(true);
+ if (Widget::widgetExists(mCallerWindow))
+ mCallerWindow->setSticky(true);
}
else if (link == "join chat" && being)
{
@@ -1715,7 +1715,7 @@ void PopupMenu::handleLink(const std::string &link,
mMapItem = nullptr;
mTab = nullptr;
mSpell = nullptr;
- mWindow = nullptr;
+ mCallerWindow = nullptr;
mDialog = nullptr;
mButton = nullptr;
mName.clear();
@@ -1740,7 +1740,7 @@ void PopupMenu::showPopup(Window *const parent,
for (int f = 0; f < maxCards; f ++)
mItemCards[f] = item->getCard(f);
mItemColor = item->getColor();
- mWindow = parent;
+ mCallerWindow = parent;
mX = x;
mY = y;
mName.clear();
@@ -2876,7 +2876,7 @@ void PopupMenu::clear()
mMapItem = nullptr;
mTab = nullptr;
mSpell = nullptr;
- mWindow = nullptr;
+ mCallerWindow = nullptr;
mButton = nullptr;
mTextField = nullptr;
}