MenuPanel.st
changeset 6003 d2d8b837acdd
parent 5995 2acec64a833b
child 6004 1aa4052dd0d3
--- a/MenuPanel.st	Wed Feb 13 17:19:57 2019 +0100
+++ b/MenuPanel.st	Fri Feb 15 09:41:42 2019 +0100
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "
  COPYRIGHT (c) 1997 by eXept Software AG
               All Rights Reserved
@@ -3917,7 +3915,13 @@
         "/ then shorten the delay time
         "/ motionPoint x < (self width//3) ifTrue:[
         "/    delayTime := delayTime / 2.
-        "/ ].    
+        "/ ]. 
+        
+        (selection isNil or:[selection visibleSubmenu isNil]) ifTrue:[
+            "/ no menu open currently
+            delayTime := 0.
+            Transcript showCR:'x'
+        ].
     ].
 
     "no autoscroll, if the mouse pointer is inside the scroll button"
@@ -3977,7 +3981,7 @@
     ].
 
     "Modified: / 15-03-2017 / 20:41:07 / stefan"
-    "Modified: / 17-11-2018 / 11:03:05 / Claus Gittinger"
+    "Modified: / 15-02-2019 / 09:08:09 / Claus Gittinger"
 !
 
 handleButtonPress:button atPoint:aPoint
@@ -5194,7 +5198,7 @@
      we have non translated sub menus (when using them later for viewing).
      Problem expecco Menu 'View' was somethimes untranslated and somethimes not.
      Dependent if this code was called before the user did open (instantiate) the menu via the application.
-     May also the shortcuts itself could vary when translated 'Open &File' -> 'Datei &öffnen' ????"
+     May also the shortcuts itself could vary when translated 'Open &File' -> 'Datei &öffnen' ????"
     Menu::NeedResourcesQuery answer:true do:[
 "/    Menu::NeedResourcesQuery answer:false do:[
         [true] whileTrue:[
@@ -6159,7 +6163,9 @@
         Processor removeTimedBlock:b.
     ].
 
-    delayedOpenSeconds := self delayInSecondsBeforeOpeningSubmenu.
+    (delayedOpenSeconds := delayTimeInSeconds) isNil ifTrue:[
+        delayedOpenSeconds := self delayInSecondsBeforeOpeningSubmenu.
+    ].
     "/ self verticalLayout ifFalse:[ delayedOpenSeconds := 0.1 ].
 
     oldSelect := selection.
@@ -6231,6 +6237,7 @@
     ].
 
     "Created: / 28-05-2018 / 09:17:12 / Claus Gittinger"
+    "Modified: / 15-02-2019 / 08:59:09 / Claus Gittinger"
 !
 
 selection