#BUGFIX by Maren
class: MenuPanel
comment/format in: #makeItemVisible:
changed: #hasScrollerAt:
fix for scrolling unvisible items
--- 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.