Re: Multiple selections delete bug

From: "Virgil Frum" <virgil(at)netappi(dot)com>
To: <pgadmin-support(at)postgresql(dot)org>
Subject: Re: Multiple selections delete bug
Date: 2004-10-06 13:37:22
Message-ID: 002f01c4aba9$9c39e880$310210ac@virgil
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

The problem is just partially resolved. I've made some new tests (on oct 05
release) and looked over changes you've made in src/ui/frmEditGrid.cpp.
Conclusion: deletion is working correctly only if rows are selected in
ascending or descending order with or without gaps. Selecting rows in an
arbitrary order (ex. 7, 8, 9, 4, 5, 6) won't work.

Method sqlTable::DeleteRows(size_t pos, size_t rows) is working correctly
only on successively rows. So, I see 2 possible solutions (with DeleteRows()
unchanged):
1) order ascending 'delrows' array (wxArrayInt from frmEditGrid::OnDelete -
line 498) and remove lines added in version 1.56
2) call sqlGrid->GetSelectedRows() after every
sqlGrid->DeleteRows(delrows.Item(0), 1);

I'm sorry for insistence, but I want to avoid deletion of wrong lines.

Regards,
Virgil

>> When multiple rows are selected (in Edit Data window) from
>> bottom to top and Delete button is pressed then either the
>> program crashes or wrong rows are deleted.
>>
>
> Thanks. I've committed a fix for this to CVS.
>
> Regards, Dave.

In response to

Browse pgadmin-support by date

  From Date Subject
Next Message Dave Page 2004-10-06 13:43:22 Re: Multiple selections delete bug
Previous Message Andreas Pflug 2004-10-06 09:24:33 Re: Cannot add non-null columns