diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-02-29 22:44:19 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-02-29 22:44:19 +0300 |
commit | b3f55809a8a56a5acf180371f05163091263cbda (patch) | |
tree | a76167c666e6085a281090bffd797883093adf1a /src/gui/npcdialog.cpp | |
parent | c53136fce2b1cca1bb9273255ad86f0aded747c2 (diff) | |
download | manaverse-b3f55809a8a56a5acf180371f05163091263cbda.tar.gz manaverse-b3f55809a8a56a5acf180371f05163091263cbda.tar.bz2 manaverse-b3f55809a8a56a5acf180371f05163091263cbda.tar.xz manaverse-b3f55809a8a56a5acf180371f05163091263cbda.zip |
Fix npc menu focus/defocus issue.
Diffstat (limited to 'src/gui/npcdialog.cpp')
-rw-r--r-- | src/gui/npcdialog.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gui/npcdialog.cpp b/src/gui/npcdialog.cpp index 362d9db9d..1aeb76ec2 100644 --- a/src/gui/npcdialog.cpp +++ b/src/gui/npcdialog.cpp @@ -342,9 +342,20 @@ void NpcDialog::parseListItems(const std::string &itemString) mItems.push_back(tmp); if (!mItems.empty()) + { mItemList->setSelected(0); + mItemList->requestFocus(); + } else + { mItemList->setSelected(-1); + } +} + +void NpcDialog::refocus() +{ + if (!mItems.empty()) + mItemList->requestFocus(); } void NpcDialog::textRequest(const std::string &defaultText) |