Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 357805 - CheckBoxTableViewer: if multiple rows are selected, Space toggles only one item
Summary: CheckBoxTableViewer: if multiple rows are selected, Space toggles only one item
Status: RESOLVED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.1   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-15 10:02 EDT by Thomas Singer CLA
Modified: 2011-09-21 11:51 EDT (History)
1 user (show)

See Also:


Attachments
sample to reproduce the bug (2.44 KB, text/plain)
2011-09-15 10:02 EDT, Thomas Singer CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Singer CLA 2011-09-15 10:02:24 EDT
Build Identifier: 3.7.0.v3735b

Run the attached sample code and select both rows. Now press Space. Instead of all rows to be checked, only one is checked.

Reproducible: Always
Comment 1 Thomas Singer CLA 2011-09-15 10:02:44 EDT
Created attachment 203410 [details]
sample to reproduce the bug
Comment 2 Felipe Heidrich CLA 2011-09-19 14:57:00 EDT
I think this behaviour is by design, test on gtk and mac. It all the same.
The idea is that backspace only acts on the focus item (on windows, that is the item with the dot rectangle around, you can move it holding the alt key + arrow up and down, without changing the selection).
sorry that this is not the behaviour you expect but if I change it I break people who relie on this.
Comment 3 Thomas Singer CLA 2011-09-20 11:59:10 EDT
(In reply to comment #2)
> The idea is that backspace only acts on the focus item

Backspace or space?

How to otherwise select/unselect all items easily? Could I override somehow the current behavior in platform-specific way?
Comment 4 Felipe Heidrich CLA 2011-09-21 11:51:27 EDT
space, sorry.

I think I can overwrite it.
hook a keyDown listener, listen for space and call setSelection() on each item in the selection. do forget to stop the default handler from running by setting event.doit to false.