#109306 Fixing moving image hyperlink from the normal layout to absolute one.
1.1 --- a/visualweb.designer/src/org/netbeans/modules/visualweb/css2/LineBoxGroup.java Wed Jul 11 02:59:24 2007 +0000
1.2 +++ b/visualweb.designer/src/org/netbeans/modules/visualweb/css2/LineBoxGroup.java Wed Jul 11 08:03:30 2007 +0000
1.3 @@ -148,6 +148,26 @@
1.4 return false;
1.5 } else {
1.6 boolean ret = allBoxes.remove(box);
1.7 +
1.8 + // XXX #109306 Remove also sibling boxes representing the same element.
1.9 + // XXX Why they don't have common parent?
1.10 + Element element = box.getElement();
1.11 + if (element != null) {
1.12 + int size = allBoxes.size();
1.13 + List<CssBox> toRemove = new ArrayList<CssBox>();
1.14 + for (int i = 0; i < size; i++) {
1.15 + CssBox siblingBox = allBoxes.get(i);
1.16 + if (siblingBox == null) {
1.17 + continue;
1.18 + }
1.19 + if (element == siblingBox.getElement()) {
1.20 + toRemove.add(siblingBox);
1.21 + }
1.22 + }
1.23 + for (CssBox siblingBoxToRemove : toRemove) {
1.24 + allBoxes.remove(siblingBoxToRemove);
1.25 + }
1.26 + }
1.27
1.28 if (allBoxes.size() == 0) {
1.29 ContainerBox parent = getParent();