ListModelView.st
changeset 5919 25799af0939c
parent 5906 98eab541bd52
child 5958 198a6b4a3a8b
--- a/ListModelView.st	Wed Oct 03 12:54:42 2018 +0200
+++ b/ListModelView.st	Sun Oct 07 21:52:10 2018 +0200
@@ -644,7 +644,8 @@
      stop  "{ Class: SmallInteger }"
      start "{ Class: SmallInteger }"
      newSz "{ Class: SmallInteger }"
-    |
+     y|
+     
     stop  := aStop.
     start := aStart.
 
@@ -670,12 +671,20 @@
     newLines := startOfLinesY. "/ copy.
     newLines removeFromIndex:(start + 1) toIndex:(stop + 1).
 
-    (start + 1) to:newSz do:[:i|
-        absY0 := newLines at:i.
-        newLines at:i put:(absY0 - dltY).
-    ].
-    startOfLinesY := newLines.
-
+    [:exit |
+        (start + 1) to:newSz do:[:i|
+            y := newLines at:i.
+            "/ should not be nil, but it is!!
+            y isNil ifTrue:[
+                self recomputeHeightOfContents.
+                exit value.
+            ].    
+            absY0 := y.
+            newLines at:i put:(absY0 - dltY).
+        ].
+        startOfLinesY := newLines.
+    ] valueWithExit.
+    
     orgY  := viewOrigin y.
     orgX  := viewOrigin x.
 
@@ -733,6 +742,8 @@
                   height:(maxHg - visY0).
     ].
     self contentsChanged.
+
+    "Modified: / 06-10-2018 / 12:36:32 / Claus Gittinger"
 !
 
 update:what with:aPara from:chgObj