# HG changeset patch # User Stefan Vogel # Date 1237987527 -3600 # Node ID 62831852b4876ef96a42ce154222ce5e05cf086d # Parent b8999543e2b48dfc75af090180aa0161a11df595 Incomplete source in last rev diff -r b8999543e2b4 -r 62831852b487 UIObjectView.st --- a/UIObjectView.st Wed Mar 25 14:05:57 2009 +0100 +++ b/UIObjectView.st Wed Mar 25 14:25:27 2009 +0100 @@ -1452,7 +1452,48 @@ relOrgX := relOrg x - bwWidth. relOrgY := relOrg y - bwWidth. width := aView width + bwWidth + bwWidth. - height := aView height + bwWidth + bwWid + height := aView height + bwWidth + bwWidth. + + size to:1 by:-1 do:[:anIndex| + damage := theDamages at:anIndex. + + "/ compute the rectangle into the view + y := damage top - relOrgY. + x := damage left - relOrgX. + w := damage width. + h := damage height. + + isRepaired := true. + + x < 0 ifTrue:[ w := w + x. x := 0. isRepaired := false ]. + y < 0 ifTrue:[ h := h + y. y := 0. isRepaired := false ]. + x + w > width ifTrue:[ w := width - x. isRepaired := false ]. + y + h > height ifTrue:[ h := height - y. isRepaired := false ]. + + (w > 0 and:[h > 0]) ifTrue:[ + bwWidth ~~ 0 ifTrue:[ + color isNil ifTrue:[ + "/ must force redraw of border + color := aView borderColor. + aView borderColor:(Color colorId:1). + aView borderColor:color. + ]. + w := w - bwWidth. + h := h - bwWidth. + + (x := x - bwWidth) < 0 ifTrue:[w := w + x. x := 0]. + (y := y - bwWidth) < 0 ifTrue:[h := h + y. y := 0]. + + (w > 0 and:[h > 0]) ifFalse:[w := 0]. + ]. + + w > 0 ifTrue:[ + aView clearRectangleX:x y:y width:w height:h. + aView exposeX:x y:y width:w height:h + ]. + isRepaired ifTrue:[ theDamages removeIndex:anIndex ]. + ] + ]. ! selection