summaryrefslogtreecommitdiff
path: root/src/gui/npcdialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/npcdialog.cpp')
-rw-r--r--src/gui/npcdialog.cpp11
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)