Home » U++ Library support » FileSel&FileList, Path » FileSel in Windows: a small problem
FileSel in Windows: a small problem [message #49709] |
Tue, 10 April 2018 12:34 |
pvictor
Messages: 67 Registered: December 2015
|
Member |
|
|
Hello.
I noticed a small issue in FileSel under Windows:
when I click "Network" on the left side, then any local disk, it opens, but I cannot enter into any subdirectory.
If after clicking "Network" I enter into any network folder, all works OK.
It happens in TheIde as well.
I've found a small change in source code, that solves this problem:
CtrlLib/FileSel.cpp before:
bool FileSel::OpenItem() {
if(list.IsCursor()) {
#ifdef PLATFORM_WIN32
if(netnode.GetCount()) {
SelectNet();
return true;
}
#endif
const FileList::File& m = list.Get(list.GetCursor());
#ifdef PLATFORM_WIN32
if(IsNull(dir) && m.name == t_("Network")) {
netnode = NetNode::EnumRoot();
netnode.Append(NetNode::EnumRemembered());
LoadNet();
return true;
}
#endif
if(m.isdir) {
SetDir(AppendFileName(~dir, m.name));
return true;
}
}
if(mode != SELECTDIR)
Finish();
return false;
}
CtrlLib/FileSel.cpp after:
bool FileSel::OpenItem() {
if(list.IsCursor()) {
const FileList::File& m = list.Get(list.GetCursor());
#ifdef PLATFORM_WIN32
if(IsNull(dir) && m.name == t_("Network")) {
netnode = NetNode::EnumRoot();
netnode.Append(NetNode::EnumRemembered());
LoadNet();
return true;
}
#endif
if(m.isdir) {
SetDir(AppendFileName(~dir, m.name));
return true;
}
// just moved from above
#ifdef PLATFORM_WIN32
if(netnode.GetCount()) {
SelectNet();
return true;
}
#endif
}
if(mode != SELECTDIR)
Finish();
return false;
}
Most likely, this swapping the code isn't the best solution, but it helps.
Victor
|
|
|
Goto Forum:
Current Time: Mon Jun 10 13:45:49 CEST 2024
Total time taken to generate the page: 0.02245 seconds
|