mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-08-28 06:12:53 -06:00
FileSel: PreSelect improved (now supports SaveAs, file type now set correctly)
git-svn-id: svn://ultimatepp.org/upp/trunk@13495 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
568e93b281
commit
7a6958da7d
1 changed files with 17 additions and 6 deletions
|
|
@ -1763,6 +1763,14 @@ bool FileSel::Execute(int _mode) {
|
|||
px += dp;
|
||||
}
|
||||
dir.HSizePos(dr.left, px + 4);
|
||||
if(preselect.GetCount()) {
|
||||
for(int i = 0; i < mask.GetCount(); i++) {
|
||||
if(PatternMatchMulti(mask[i], preselect)) {
|
||||
ActiveType(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
int q = type.FindValue(activetype);
|
||||
if(q >= 0)
|
||||
type <<= q;
|
||||
|
|
@ -1782,12 +1790,15 @@ bool FileSel::Execute(int _mode) {
|
|||
}
|
||||
list.SetSbPos(lastsby);
|
||||
if(preselect.GetCount()) {
|
||||
for(int i = 0; i < list.GetCount(); i++)
|
||||
if(list[i].name == preselect) {
|
||||
list.SetCursor(i);
|
||||
ActiveFocus(list);
|
||||
break;
|
||||
}
|
||||
if(mode == SAVEAS)
|
||||
file <<= preselect;
|
||||
else
|
||||
for(int i = 0; i < list.GetCount(); i++)
|
||||
if(list[i].name == preselect) {
|
||||
list.SetCursor(i);
|
||||
ActiveFocus(list);
|
||||
break;
|
||||
}
|
||||
preselect.Clear();
|
||||
}
|
||||
FileUpdate();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue