Patch level :2.2 nopatch
Files correlati : Ricompilazione Demo : [ ] Commento :modificata e sveltita la scan cursor; e pure la progind git-svn-id: svn://10.65.10.50/trunk@13837 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
aa3dd28e95
commit
bf12e004e5
@ -257,7 +257,7 @@ bool TProgind::setstatus(long l)
|
||||
update();
|
||||
do_events();
|
||||
}
|
||||
return tictac;
|
||||
return !iscancelled();
|
||||
}
|
||||
|
||||
// TTimerind ------------------------------------------------------------
|
||||
|
@ -1677,36 +1677,38 @@ bool TCursor::is_first_match(int ln)
|
||||
bool TCursor::scan(CURSOR_SCAN_FUNC func, void* pJolly, const char* msg)
|
||||
{
|
||||
TRecnotype tot = 0; // Temporarily
|
||||
|
||||
if (msg == NULL || *msg == '\0')
|
||||
msg = TR("Elaborazione in corso...");
|
||||
TProgind pi(tot, msg, true, true);
|
||||
|
||||
{
|
||||
TWait_cursor hourglass;
|
||||
tot = items();
|
||||
}
|
||||
|
||||
bool ok = true;
|
||||
if (tot > 0)
|
||||
{
|
||||
freeze();
|
||||
pi.setmax(tot);
|
||||
TProgind* pi = NULL;
|
||||
if (tot > 1)
|
||||
{
|
||||
if (msg == NULL || *msg == '\0')
|
||||
msg = TR("Elaborazione in corso...");
|
||||
pi = new TProgind(tot, msg, true, true);
|
||||
}
|
||||
|
||||
freeze(true);
|
||||
for (*this = 0; pos() < tot; ++*this)
|
||||
{
|
||||
pi.addstatus(1);
|
||||
if (pi.iscancelled())
|
||||
if (!func(*relation(), pJolly))
|
||||
{
|
||||
ok = false;
|
||||
break;
|
||||
}
|
||||
if (!func(*relation(), pJolly))
|
||||
if (pi != NULL && !pi->addstatus(1))
|
||||
{
|
||||
ok = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
freeze(false);
|
||||
if (pi != NULL)
|
||||
delete pi;
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user