diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-05-13 01:00:40 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-05-13 01:00:40 +0300 |
commit | 0c53763c1eb42b9567459451ce47ef7239e151c6 (patch) | |
tree | 4fd1aceb1fbe06d498400bf29a8e6b3d304c9473 /src/gui | |
parent | 84a3ff2804a2df97a9b95d033b2c35de73271972 (diff) | |
download | mv-0c53763c1eb42b9567459451ce47ef7239e151c6.tar.gz mv-0c53763c1eb42b9567459451ce47ef7239e151c6.tar.bz2 mv-0c53763c1eb42b9567459451ce47ef7239e151c6.tar.xz mv-0c53763c1eb42b9567459451ce47ef7239e151c6.zip |
dont show popup on empty cells in char selection dialog.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/widgets/characterdisplay.cpp | 6 |
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) |