Selection Error in pre8

Subscribe to Selection Error in pre8 1 post, 1 voice

 
Avatar egalus 2 post(s)

Hi,

I just installed 2.1pre8 and found a nasty bug.
If you made a selection of auctions on a tab (like my ebay) and continue to do something on this selection (like multisnipe) and the underlying list in the tab changes (like when an auction ends and is moved to the complete tab) the selection stays at the same positions as before which almost alway leads to the action being perfomed on the wrong items.

This also happens when you refresh the viewed items from myebay and some new get added. They are added at the bottom of the list regardless of the sorting of the table and only after all are updated get sorted in the right order. As the GUI is not locked during retrieval you can make a selection during the fetch of the data and start to create a multisnipe (even on the newly added auctions) and when the sorting finally kicks in before you finish the creation of the multisnipe and the newly added auctions do not stay at the end of the list you again make a multisnipe on the wrong items.

As you are using Java I guess you use a JTable and the function jTable.getSelectedRows() to get the selection and the convert function for the indexes to the underlying List of auctions.
I guess you either
a) only store the jTable.getSelectedRows() and not the converted list of indexes the the underlying auctionlist and when adding the new auctions the mapping (and the output of jTable.getSelectedRows()) changes and you multisnipe the wrong auctions or
b) you sort the underlying datastructure and not the jTable which might lead to the same problem.