Community
Participate
Working Groups
Steps to reproduce: * Use a table with MULTI style * Dispose selected table item(s) -> the selection is empty * Select a row by clicking *and* pressing the Shift key The result is either: * the row is not shown as selected * an arbitrary range is selected (this seems to depend on the current state of the variable Table#_focusIndex) Expected: the clicked row should be selected
This bug is related to bug 235583. The patch about focusIndex synch is attached to the bug too.
Fixed in CVS HEAD. Applied patch from bug 235583 with an addition to select the single row in the scenario described above.
This bug should be reopened because there is another scenario to reproduce similar problem. Steps to reproduce: 1. In the control demo select TableViewer tab. 2. Check MULTI button. 3. Click the button "Select youngest Person" 4. While holding SHIFT key cklick with mouse over the 4th item 5. Both first and fourth items become selected 6. Click "Select youngest Person" again 7. While holding SHIFT key cklick with mouse over the 7th item 8. Now items 4th to 7th are selected and also the first item. This problem is observed also in table widget, but appears on step 7.
Reopen.
Fixed in CVS HEAD. The focusIndex was overridden by reading the selection in TableLCA#readData. Exchanging the order of readFocusIndex and readSelection fixed the problem.
The problem is solved for the Table but persists for the TableViewer, which calls Table#select() instead of Table#setSelection(). In this case, the focusIndex is not updated. Further investigation required.
Seems the new Table does not fix the problem, but possibly changed it. Now it seems there is no focused item until an item has been clicked, selected or not. Table is fine though, only TableView has the problem. Needs further investigation.
There was a similar problem with the focused item - Bug 366385. We found that RAP and SWT behaves the same in despite of it is not expected. There are two methods to set the selection in TableViewer - with or without reveal. If "reveal" is true than Table#setSelection is used which moves the focused item. If "reveal" is false than Table#select is used and the focused item is not moved.
I can't reproduce it anymore with RAP 2.3M3 and the behavior in RAP and SWT is the same (comment#8). Close as fixed.