From 0f9440fa61fbfd95b0c06217d08b07c81c897ee0 Mon Sep 17 00:00:00 2001 From: sapier Date: Sun, 10 Nov 2013 19:37:45 +0100 Subject: Fix "TODO read modinfo" in modmanager to improve ui usability --- src/guiFormSpecMenu.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src') 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(spec,e)); -- cgit v1.2.3