equal
deleted
inserted
replaced
896 ! |
896 ! |
897 |
897 |
898 removeFromIndex:startLineNr toIndex:endLineNr |
898 removeFromIndex:startLineNr toIndex:endLineNr |
899 "delete some lines" |
899 "delete some lines" |
900 |
900 |
901 |wasOn nLines| |
901 |wasOn nLines needDraw| |
902 |
902 |
903 list isNil ifTrue:[^ self]. |
903 list isNil ifTrue:[^ self]. |
904 |
904 |
905 list removeFromIndex:startLineNr toIndex:(endLineNr min:list size). |
905 list removeFromIndex:startLineNr toIndex:(endLineNr min:list size). |
906 |
906 |
907 widthOfWidestLine := nil. "/ i.e. unknown |
907 widthOfWidestLine := nil. "/ i.e. unknown |
908 self textChanged. |
908 self textChanged. |
909 |
909 |
910 startLineNr > self lastLineShown ifFalse:[ |
910 ((startLineNr <= self lastLineShown) |
911 (endLineNr min:list size) < firstLineShown ifFalse:[ |
911 and:[endLineNr >= firstLineShown]) ifTrue:[ |
912 self redrawFromLine:startLineNr. |
912 self redrawFromLine:startLineNr. |
913 ]. |
|
914 ]. |
913 ]. |
915 |
914 |
916 nLines := list size. |
915 nLines := list size. |
917 (firstLineShown >= nLines) ifTrue:[ |
916 (firstLineShown >= nLines) ifTrue:[ |
918 self makeLineVisible:nLines |
917 self makeLineVisible:nLines |
3630 "/ self invalidateDeviceRectangle:((margin@margin) corner:(width-margin@textStartTop)) repairNow:false. |
3629 "/ self invalidateDeviceRectangle:((margin@margin) corner:(width-margin@textStartTop)) repairNow:false. |
3631 |
3630 |
3632 self copyFrom:self |
3631 self copyFrom:self |
3633 x:0 y:y0 toX:0 y:textStartTop |
3632 x:0 y:y0 toX:0 y:textStartTop |
3634 width:w height:h async:true. |
3633 width:w height:h async:true. |
3635 y1 := h. |
3634 y1 := h - 1. |
|
3635 y0 := y0 + 1. |
3636 ] ifFalse:[ "/ copy up |
3636 ] ifFalse:[ "/ copy up |
3637 self copyFrom:self |
3637 self copyFrom:self |
3638 x:margin y:textStartTop toX:margin y:y0 |
3638 x:margin y:textStartTop toX:margin y:y0 |
3639 width:w height:h async:true. |
3639 width:w height:h async:true. |
3640 y1 := 0. |
3640 y1 := 0. |
4151 ! ! |
4151 ! ! |
4152 |
4152 |
4153 !ListView class methodsFor:'documentation'! |
4153 !ListView class methodsFor:'documentation'! |
4154 |
4154 |
4155 version |
4155 version |
4156 ^ '$Header: /cvs/stx/stx/libwidg/ListView.st,v 1.235 2000-08-23 16:38:07 cg Exp $' |
4156 ^ '$Header: /cvs/stx/stx/libwidg/ListView.st,v 1.236 2000-08-23 22:33:55 cg Exp $' |
4157 ! ! |
4157 ! ! |