class: ListView
authorClaus Gittinger <cg@exept.de>
Thu, 27 Jun 2013 15:54:42 +0200
changeset 4634 663a43a31111
parent 4633 d81164de732d
child 4635 6218b92cce91
class: ListView comment/format in: #contentsChanged
ListView.st
--- a/ListView.st	Thu Jun 27 14:14:07 2013 +0200
+++ b/ListView.st	Thu Jun 27 15:54:42 2013 +0200
@@ -2014,29 +2014,29 @@
 !ListView methodsFor:'event handling'!
 
 contentsChanged
-    "contents changed - move origin up if possible"
+    "size of contents changed - move origin up if possible"
 
     |listSize newOrigin|
 
     shown ifTrue:[
-	list notNil ifTrue:[
-	    listSize := self numberOfLines.
-
-	    listSize == 0 ifTrue:[
-		widthOfWidestLine := 0.
-	    ].
-
-	    "
-	     if we are beyond the end, scroll up a bit
-	    "
-	    ((firstLineShown + nFullLinesShown) > listSize) ifTrue:[
-		newOrigin := listSize - nFullLinesShown + 1.
-		newOrigin < 1 ifTrue:[
-		    newOrigin := 1
-		].
-		self scrollToLine: newOrigin.
-	    ].
-	].
+        list notNil ifTrue:[
+            listSize := self numberOfLines.
+
+            listSize == 0 ifTrue:[
+                widthOfWidestLine := 0.
+            ].
+
+            "
+             if we are beyond the end, scroll up a bit
+            "
+            ((firstLineShown + nFullLinesShown) > listSize) ifTrue:[
+                newOrigin := listSize - nFullLinesShown + 1.
+                newOrigin < 1 ifTrue:[
+                    newOrigin := 1
+                ].
+                self scrollToLine: newOrigin.
+            ].
+        ].
     ].
 
     ^ super contentsChanged
@@ -4899,10 +4899,10 @@
 !ListView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/ListView.st,v 1.367 2013-06-17 12:52:56 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/ListView.st,v 1.368 2013-06-27 13:54:42 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libwidg/ListView.st,v 1.367 2013-06-17 12:52:56 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/ListView.st,v 1.368 2013-06-27 13:54:42 cg Exp $'
 ! !