| Summary: | SplitDropAgent should not use client area for preview rectangle | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] e4 | Reporter: | Stefan Mücke <s.muecke> | ||||||
| Component: | UI | Assignee: | Project Inbox <e4.ui-inbox> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | bokowski, emoffatt, remy.suen | ||||||
| Version: | unspecified | Flags: | emoffatt:
review+
emoffatt: review? |
||||||
| Target Milestone: | 1.0 RC3 | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows 7 | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
The intermediate Composite is created by the TrimmedPartLayout. Created attachment 174815 [details]
patch
Boris, any chance to get this into RC3?
The code is safe; I added a null check to make sure it can never result in an NPE.
Looks safe to me and I do agree that this discrepancy is odd and should be corrected. Committed in >20100722. Applied the patch. Thanks Stefan! Thanks for applying the patch. Now I can sleep again ;-) Oh no, I forgot that bug 320464 is still open... ;-) Verified on XP in I20100726-2152. |
Created attachment 174688 [details] screenshot The preview rectangle for dragging parts is inconsistent and IHMO wrong for view stacks (because the dragged view will not be placed inside of the drop target). See screenshot. It seems there is code in SplitDropAgent.getRectangle(...) that was meant to fetch the CTabFolder for computing the rectangle, but this code fails because there is another Composite between the drop part's widget and the CTabFolder. A fix would be to add another "if" to check the parent's parent, or to always check for the parent's parent (if the intermediate Composite always exists). if (ctrl.getParent() instanceof CTabFolder) ctrl = ctrl.getParent(); else if (ctrl.getParent().getParent() instanceof CTabFolder) ctrl = ctrl.getParent().getParent();