summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-05-13 01:00:40 +0300
committerAndrei Karas <akaras@inbox.ru>2013-05-13 01:00:40 +0300
commit0c53763c1eb42b9567459451ce47ef7239e151c6 (patch)
tree4fd1aceb1fbe06d498400bf29a8e6b3d304c9473 /src
parent84a3ff2804a2df97a9b95d033b2c35de73271972 (diff)
downloadplus-0c53763c1eb42b9567459451ce47ef7239e151c6.tar.gz
plus-0c53763c1eb42b9567459451ce47ef7239e151c6.tar.bz2
plus-0c53763c1eb42b9567459451ce47ef7239e151c6.tar.xz
plus-0c53763c1eb42b9567459451ce47ef7239e151c6.zip
dont show popup on empty cells in char selection dialog.
Diffstat (limited to 'src')
-rw-r--r--src/gui/widgets/characterdisplay.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gui/widgets/characterdisplay.cpp b/src/gui/widgets/characterdisplay.cpp
index 1815ec395..de0306f7c 100644
--- a/src/gui/widgets/characterdisplay.cpp
+++ b/src/gui/widgets/characterdisplay.cpp
@@ -114,7 +114,11 @@ void CharacterDisplay::mouseMoved(gcn::MouseEvent &event)
int mouseX = 0;
int mouseY = 0;
SDL_GetMouseState(&mouseX, &mouseY);
- mPopup->show(mouseX, mouseY, mName->getCaption());
+ const std::string &name = mName->getCaption();
+ if (!name.empty())
+ mPopup->show(mouseX, mouseY, name);
+ else
+ mPopup->setVisible(false);
}
void CharacterDisplay::mousePressed(gcn::MouseEvent &event)