Bug 444724 - Tree.getItem(Point): optionally ignore SWT.FULL_SELECTION
Summary: Tree.getItem(Point): optionally ignore SWT.FULL_SELECTION
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.5   Edit
Hardware: PC Windows NT
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-22 08:02 EDT by Thomas Singer CLA
Modified: 2020-02-08 02:46 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Singer CLA 2014-09-22 08:02:11 EDT
Currently, Tree.getItem(Point) only returns the item, if it is inside the item's bounding box - unless SWT.FULL_SECTION is specified (which we can't use because of bug #438479). For an own TreeDropTargetEffect we need Tree.getItem(Point) to only use the y-coordinate.

Suggestion: introduce an overloaded Tree.getItem(Point, boolean) that only depending on the second parameter checks the x-coordinate. Make the existing Tree.getItem(Point) path to the new Tree.getItem(Point, boolean) using the SWT.FULL_SECTION check.
Comment 1 Thomas Singer CLA 2014-09-22 08:04:28 EDT
We currently have to iterate over all visible tree items calculating their bounds - which, as you can imagine, is VERY slow.