summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/npcdialog.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gui/npcdialog.cpp b/src/gui/npcdialog.cpp
index e8ea3388f..36677446d 100644
--- a/src/gui/npcdialog.cpp
+++ b/src/gui/npcdialog.cpp
@@ -333,6 +333,11 @@ void NpcDialog::parseListItems(const std::string &itemString)
std::string tmp;
while (getline(iss, tmp, ':'))
mItems.push_back(tmp);
+
+ if (!mItems.empty())
+ mItemList->setSelected(0);
+ else
+ mItemList->setSelected(-1);
}
void NpcDialog::textRequest(const std::string &defaultText)