Corretta e velocizzata cancellazione dei record.
git-svn-id: svn://10.65.10.50/trunk@5665 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
62d347f0a3
commit
2810135cc8
@ -58,34 +58,37 @@ bool TEdit_file::_browse(TCursor& cursor, const TFilename& name)
|
|||||||
cursor.freeze(TRUE);
|
cursor.freeze(TRUE);
|
||||||
bool go = FALSE;
|
bool go = FALSE;
|
||||||
bool first = FALSE;
|
bool first = FALSE;
|
||||||
int j;
|
long j;
|
||||||
for (j = 0, cursor = 0; j < sheet.items(); ++cursor, j++)
|
const long items = sheet.items();
|
||||||
|
const long checked = sheet.checked();
|
||||||
|
if (checked && yesno_box("Si desidera cancellare i %ld record indicati?", checked))
|
||||||
{
|
{
|
||||||
if (sheet.checked(j))
|
begin_wait();
|
||||||
|
for (j = 0, cursor = 0; j < items; j++)
|
||||||
{
|
{
|
||||||
if (!go && !first)
|
if (sheet.checked(j))
|
||||||
go = yesno_box("Si desidera cancellare i %d record indicati?", sheet.checked());
|
|
||||||
first = TRUE;
|
|
||||||
|
|
||||||
if (!pind)
|
|
||||||
{
|
{
|
||||||
pind = new TProgind(sheet.checked(),"Attendere...", TRUE, TRUE, 32);
|
if (!pind)
|
||||||
pind->addstatus(1);
|
{
|
||||||
}
|
pind = new TProgind(sheet.checked(),"Attendere...", TRUE, TRUE, 32);
|
||||||
else
|
pind->addstatus(1);
|
||||||
{
|
}
|
||||||
if (pind->iscancelled()) break;
|
else
|
||||||
pind->addstatus(1);
|
{
|
||||||
}
|
if (pind->iscancelled()) break;
|
||||||
|
pind->addstatus(1);
|
||||||
|
}
|
||||||
|
|
||||||
if (go) cursor.file().remove();
|
cursor = j;
|
||||||
sheet.uncheck(j);
|
cursor.file().remove();
|
||||||
|
sheet.uncheck(j);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
end_wait();
|
||||||
}
|
}
|
||||||
if (pind) delete pind;
|
if (pind) delete pind;
|
||||||
cursor.freeze(FALSE);
|
cursor.freeze(FALSE);
|
||||||
|
|
||||||
if (first)
|
|
||||||
{
|
{
|
||||||
if (cursor.items() > 0)
|
if (cursor.items() > 0)
|
||||||
sheet.select(1);
|
sheet.select(1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user