ListView.st
changeset 1453 d07b4b418106
parent 1452 d4c481299b88
child 1458 76e820fde1e7
equal deleted inserted replaced
1452:d4c481299b88 1453:d07b4b418106
   774 !
   774 !
   775 
   775 
   776 removeIndex:lineNr
   776 removeIndex:lineNr
   777     "delete a line, redraw the view"
   777     "delete a line, redraw the view"
   778 
   778 
   779     |visLine w h x y2
   779     |visLine w h x
   780      srcY "{ Class: SmallInteger }" |
   780      srcY "{ Class: SmallInteger }" |
   781 
   781 
   782     (self removeIndexWithoutRedraw:lineNr) ifFalse:[^ self].
   782     (self removeIndexWithoutRedraw:lineNr) ifFalse:[^ self].
   783 
   783 
   784     "
   784     "
   792 "/ CLAUS fixes leftOver selection pixels
   792 "/ CLAUS fixes leftOver selection pixels
   793         w := w + leftMargin.
   793         w := w + leftMargin.
   794         x := margin.
   794         x := margin.
   795 
   795 
   796         srcY := topMargin + (visLine * fontHeight).
   796         srcY := topMargin + (visLine * fontHeight).
   797         h := ((nLinesShown - visLine) * fontHeight).
   797 "/        h := ((nLinesShown - visLine) * fontHeight).
   798         y2 := srcY + h.
   798         h := (height - margin - srcY).
   799         y2 >= (height - margin) ifTrue:[
       
   800             h := (height - margin - ((nLinesShown - visLine) * fontHeight)).
       
   801         ].
       
   802         self catchExpose.
   799         self catchExpose.
   803         self 
   800         self 
   804             copyFrom:self 
   801             copyFrom:self 
   805             x:x y:srcY
   802             x:x y:srcY
   806             toX:x y:(srcY - fontHeight)
   803             toX:x y:(srcY - fontHeight)
   807             width:w height:h
   804             width:w height:h
   808             async:true.
   805             async:true.
       
   806 
   809         self redrawVisibleLine:nFullLinesShown.
   807         self redrawVisibleLine:nFullLinesShown.
   810         "
   808         "
   811          redraw last partial line - if any
   809          redraw last partial line - if any
   812         "
   810         "
   813         (nFullLinesShown ~~ nLinesShown) ifTrue:[
   811         (nFullLinesShown ~~ nLinesShown) ifTrue:[
  3775 ! !
  3773 ! !
  3776 
  3774 
  3777 !ListView class methodsFor:'documentation'!
  3775 !ListView class methodsFor:'documentation'!
  3778 
  3776 
  3779 version
  3777 version
  3780     ^ '$Header: /cvs/stx/stx/libwidg/ListView.st,v 1.151 1998-02-24 17:33:49 cg Exp $'
  3778     ^ '$Header: /cvs/stx/stx/libwidg/ListView.st,v 1.152 1998-02-24 17:40:21 cg Exp $'
  3781 ! !
  3779 ! !