Re: Multiple selections delete bug - Mailing list pgadmin-support

From Virgil Frum
Subject Re: Multiple selections delete bug
Date
Msg-id 002f01c4aba9$9c39e880$310210ac@virgil
Whole thread Raw
In response to Re: Multiple selections delete bug  ("Dave Page" <dpage@vale-housing.co.uk>)
List 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.



pgadmin-support by date:

Previous
From: Andreas Pflug
Date:
Subject: Re: Cannot add non-null columns
Next
From: "Dave Page"
Date:
Subject: Re: Multiple selections delete bug