Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 345892 - Selection jumps in tree
Summary: Selection jumps in tree
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.7   Edit
Hardware: PC Mac OS X
: P3 major (vote)
Target Milestone: 3.7 RC2   Edit
Assignee: Silenio Quarti CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 276531
Blocks:
  Show dependency tree
 
Reported: 2011-05-16 04:33 EDT by Markus Keller CLA
Modified: 2011-05-20 05:26 EDT (History)
10 users (show)

See Also:
eclipse.felipe: review+
gheorghe: review+


Attachments
simple test case (1.04 KB, application/octet-stream)
2011-05-16 14:43 EDT, Silenio Quarti CLA
no flags Details
patch (15.98 KB, patch)
2011-05-16 14:54 EDT, Silenio Quarti CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Keller CLA 2011-05-16 04:33:48 EDT
+++ This bug was initially created as a clone of Bug #276531 +++

Bug 276531 is back in RC1 (I20110512-2000). Was OK in I20110428-0848.

Steps:

1. Open Preferences dialog
2. Make sure it comes up all collapsed, with the first item (General) selected. If not, select the first item, close the dialog, and open again.
3. Click on "Ant"

Expected: "Ant" gets selected
Actual: "Plug-in Development" gets selected.
Comment 1 Silenio Quarti CLA 2011-05-16 14:43:37 EDT
Created attachment 195778 [details]
simple test case

The problem happens because the dialog is resized during the mouse down event. The coordinate system of the cocoa tree view is up side down, so making the tree taller changes the item that is under the mouse event.
Comment 2 Silenio Quarti CLA 2011-05-16 14:54:15 EDT
Created attachment 195780 [details]
patch

This patch puts back the code from April 28 that was working around this problem. This is the safest fix at this point, but note that it does not completely fix it. If the user clicks far enough to the right of the item, the problem still happens.
Comment 3 Silenio Quarti CLA 2011-05-17 10:47:58 EDT
Fixed in HEAD
Comment 4 Markus Keller CLA 2011-05-20 05:26:05 EDT
Verified in I20110519-1138 that it works fine when you click the text.

(In reply to comment #2)
> If the user clicks far enough to the right of the item, the
> problem still happens.

It also happens when you click on the left of the triangle.