Community
Participate
Working Groups
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();
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.