Community
Participate
Working Groups
Build Identifier: M20110909-1335 Let me write some code to describe the bug. String[] column = new String[] { "name", "condition" }; Tree tree = new Tree(composite, SWT.BORDER | SWT.MULTI); TreeViewer treeViewer = new TreeViewer(tree); tree.setLinesVisible(true); tree.setHeaderVisible(true); treeViewer.setColumnProperties(column); CellEditor[] cellEditors = new CellEditor[2]; cellEditors[0] = new TextCellEditor(treeViewer .getTree()); cellEditors[1] = new TextCellEditor(treeViewer .getTree()); treeViewer.setCellEditors(cellEditors); treeViewer.setInput(....); 1. the tree is not SWT.FULL_SELECTION; 2. set two column to the treeViewer; 3. put some data into the tree. I can not select/modify the data of the second column(condition), unless I select the first column first. I think the method "getItemAt" in TreeViewer was wrong. "tree.getSelection();" should be "tree.getItems()". protected Item getItemAt(Point p) { TreeItem[] selection = tree.getSelection(); if( selection.length == 1 ) { int columnCount = tree.getColumnCount(); for( int i = 0; i < columnCount; i++ ) { if( selection[0].getBounds(i).contains(p) ) { return selection[0]; } } } return getTree().getItem(p); } Would like to receive your reply! Reproducible: Always
Created attachment 216908 [details] the screen of the bug. the screen of the bug.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. If the bug is still relevant, please remove the stalebug whiteboard tag.