autorepeat of move fixed
authorClaus Gittinger <cg@exept.de>
Fri, 08 Aug 2008 14:02:20 +0200
changeset 2394 664ca922a80a
parent 2393 f86eef5db779
child 2395 9f9cf71a311c
autorepeat of move fixed
UIObjectView.st
--- a/UIObjectView.st	Fri Aug 08 10:53:20 2008 +0200
+++ b/UIObjectView.st	Fri Aug 08 14:02:20 2008 +0200
@@ -1778,9 +1778,9 @@
 
 !UIObjectView methodsFor:'user actions-move'!
 
-moveDo:aOneArgBlock
-    "perform a move operation
-    "
+moveDo:aOneArgBlock 
+    "perform a move operation (with auto repeat)"
+
     |sensor tm|
 
     self moveableSelection isNil ifTrue:[
@@ -1788,25 +1788,27 @@
     ].
     sensor := self sensor.
 
-    tm := 0.15.
+    tm := ButtonController defaultInitialDelay.
 
     self withSelectionHiddenDo:[
         self transaction:#move selectionDo:[:aView|self createUndoLayout:aView].
 
         [
             self selectionDo:[:aView| aOneArgBlock value:aView ].
-            Delay waitForSeconds:tm.
-            tm := 0.02.
-            self layoutChanged.
+            sensor leftButtonPressed ifTrue:[
+                self windowGroup processExposeEvents.
+                Delay waitForSeconds:tm.
+                self windowGroup processExposeEvents.
+                tm := ButtonController defaultRepeatDelay.
+                self layoutChanged.
+            ].
             sensor leftButtonPressed.
         ] whileTrue.
 
         "/ handle any expose events (for subcomponents) before
         "/ redrawing the handles.
         Delay waitForSeconds:0.1.
-        [self sensor hasExposeEventFor:nil] whileTrue:[
-            self windowGroup processExposeEvents
-        ]
+        self windowGroup processExposeEvents
     ].
 !