Patch level : 12.0 no patch
Files correlati : Commento : Corretti progress indicator dei cursori git-svn-id: svn://10.65.10.50/branches/R_10_00@23333 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
5dd5f371fa
commit
44ad50afa0
@ -1108,20 +1108,31 @@ TRecnotype TCursor::buildcursor(TRecnotype rp)
|
||||
FILE* indf = NULL;
|
||||
|
||||
const int l = strlen(to());
|
||||
double perc = 1.0;
|
||||
|
||||
if (l > 0 && DB_index_seek(fhnd, to()) >= 0)
|
||||
perc = DB_pos_perc(fhnd);
|
||||
|
||||
int junk = DB_index_seek(fhnd, from());
|
||||
if (junk < 0) junk=get_error(junk);
|
||||
if (junk == _iseof) return 0;
|
||||
|
||||
perc -= DB_pos_perc(fhnd);
|
||||
|
||||
// DB_index_recno(fhnd); // A cosa cavolo serve?
|
||||
_pos=-1;
|
||||
|
||||
const bool filtered = has_filter();
|
||||
const bool simple_filter = filtered && has_simple_filter();
|
||||
|
||||
// Barra di +
|
||||
// Barra di progresso
|
||||
const long items = (long)((double)_if->lfile().items() * perc);
|
||||
TString msg("Elaborazione ");
|
||||
msg << relation()->lfile().name();
|
||||
TProgress_monitor pi(_if->lfile().items(), msg);
|
||||
TDir d(_if->lfile().num());
|
||||
|
||||
msg << d.des();
|
||||
|
||||
TProgress_monitor pi(items, msg);
|
||||
|
||||
while (!DB_index_eof(fhnd))
|
||||
{
|
||||
@ -1980,6 +1991,10 @@ TRecnotype TSorted_cursor::buildcursor(TRecnotype rp)
|
||||
|
||||
sort.init();
|
||||
l = strlen(to());
|
||||
double perc = 1.0;
|
||||
|
||||
if (l > 0 && DB_index_seek(handle, to()) >= 0)
|
||||
perc = DB_pos_perc(handle);
|
||||
junk=DB_index_seek(handle, (char*)(const char*) from());
|
||||
if (junk < 0) junk=get_error(junk);
|
||||
if (junk == _iseof) return 0;
|
||||
@ -1987,10 +2002,16 @@ TRecnotype TSorted_cursor::buildcursor(TRecnotype rp)
|
||||
pos = DB_index_recno(handle);
|
||||
TCursor::pos()=-1;
|
||||
|
||||
perc -= DB_pos_perc(handle);
|
||||
|
||||
// Barra di progressione
|
||||
const long items = (long)((double)relation()->lfile().items() * perc);
|
||||
TString msg("Elaborazione ");
|
||||
msg << relation()->lfile().name();
|
||||
TProgress_monitor pi(relation()->lfile().items(), msg);
|
||||
TDir d(relation()->lfile().num());
|
||||
|
||||
msg << d.des();
|
||||
|
||||
TProgress_monitor pi(items, msg);
|
||||
|
||||
while (!DB_index_eof(handle))
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user