diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/guiFormSpecMenu.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/guiFormSpecMenu.cpp b/src/guiFormSpecMenu.cpp index e0ef55acd..aa1e2d9c9 100644 --- a/src/guiFormSpecMenu.cpp +++ b/src/guiFormSpecMenu.cpp @@ -721,8 +721,15 @@ void GUIFormSpecMenu::parseTextList(parserData* data,std::string element) { scrollbar->setPos(data->listbox_scroll[fname_w]); } } + else { + gui::IGUIScrollBar *scrollbar = getListboxScrollbar(e); + if (scrollbar) { + scrollbar->setPos(0); + } + } - if (str_initial_selection != "") + if ((str_initial_selection != "") && + (str_initial_selection != "0")) e->setSelected(stoi(str_initial_selection.c_str())-1); m_listboxes.push_back(std::pair<FieldSpec,gui::IGUIListBox*>(spec,e)); |