#BUGFIX by Maren
authormatilk
Tue, 15 Nov 2016 16:49:27 +0100
changeset 5328 4285558b7c86
parent 5326 cd7b51c4248c
child 5329 2baf5daabd0e
child 5330 d158258898fb
#BUGFIX by Maren class: MenuPanel comment/format in: #makeItemVisible: changed: #hasScrollerAt: fix for scrolling unvisible items
MenuPanel.st
--- a/MenuPanel.st	Wed Nov 09 20:09:26 2016 +0100
+++ b/MenuPanel.st	Tue Nov 15 16:49:27 2016 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 1997 by eXept Software AG
 	      All Rights Reserved
@@ -5371,14 +5373,15 @@
 hasScrollerAt:aDirection
     "returns true if a visible scroller at a direction exists"
 
-    self hasScrollers ifTrue:[ |layout|
+    self hasScrollers ifTrue:[ |layout item|
         aDirection == #PREV ifTrue:[
-            layout := items first layout.
+            item   := items detect:[:each|(each layout notNil and:[each isVisible])] ifNone:[^ false ].
+            layout := item layout.
 
           ^ self verticalLayout ifTrue:[ layout top  < margin]
                                ifFalse:[ layout left < margin]
         ].
-        aDirection == #NEXT ifTrue:[ |item|
+        aDirection == #NEXT ifTrue:[
             "/ must check for visibility
             item   := items detectLast:[:each|(each layout notNil and:[each isVisible])] ifNone:[^ false ].
             layout := item layout.