gui/filebrowser.cpp: restore selection,

remove double paint on exec(),
remember selected to restore on dir enter with OK button
This commit is contained in:
[CST] Focus
2013-07-17 11:29:35 +04:00
parent 4d7fb7e362
commit cc115a3615

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;