gui/filebrowser.cpp: restore selection,

remove double paint on exec(),
remember selected to restore on dir enter with OK button


Origin commit data
------------------
Commit: cc115a3615
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2013-07-17 (Wed, 17 Jul 2013)
This commit is contained in:
[CST] Focus
2013-07-17 11:29:35 +04:00
parent 0f9725796c
commit 027348d119

View File

@@ -845,8 +845,12 @@ bool CFileBrowser::exec(const char * const dirname)
std::replace(name.begin(), name.end(), '\\', '/');
paintHead();
ChangeDir(name);
paint();
int selection = -1;
if (name == Path)
selection = selected;
ChangeDir(name, selection);
//paint();
paintFoot();
int oldselected = selected;
@@ -1071,8 +1075,11 @@ bool CFileBrowser::exec(const char * const dirname)
ChangeDir(filelist[selected].Url);
else
#endif
{
selections.push_back(selected);
ChangeDir(filelist[selected].Name);
}
}
else
{
filelist[selected].Marked = true;