#DOCUMENTATION by stefan draft
authorStefan Vogel <sv@exept.de>
Thu, 07 Mar 2019 10:56:55 +0100
changeset 3648 474d54e24cab
parent 3647 7833be8fb641
child 3649 a51fab5fab19
#DOCUMENTATION by stefan class: UIPainter::TreeView comment: #doStepOver:
UIPainter.st
--- a/UIPainter.st	Tue Mar 05 23:20:37 2019 +0100
+++ b/UIPainter.st	Thu Mar 07 10:56:55 2019 +0100
@@ -7447,9 +7447,9 @@
 doStepOver:anIndex
     "moves child 'anIndex' forward or backward in list of children"
 
-    |item idx size parentItem parentItemsView itemsView canvas|
-
-    self askForSelectionChangeAllowed ifFalse:[^ self].
+    self askForSelectionChangeAllowed ifFalse:[
+        ^ self
+    ].
 
     anIndex < 0 ifTrue:[
         "/ moving up
@@ -7464,46 +7464,48 @@
     ].
     ^ self.
 
-    (    (item := self selectedNode) isNil
-     or:[(parentItem := item parent) isNil
-     or:[(size := parentItem children size) < 2
-     or:[(idx  := parentItem indexOfChild:item) == 0]]]
-    ) ifTrue:[
-        ^ self
-    ].
-
-    idx := idx + anIndex.
-
-    idx < 1 ifTrue:[idx := size]
-           ifFalse:[idx > size ifTrue:[idx := 1]].
-
-    self setSelection:nil.
-    model remove:item.
-    model add:item beforeIndex:idx below:parentItem.
-
-    idx := parentItem indexOfChild:item.
-    itemsView := item contents view.
-    parentItemsView := parentItem contents view.
-
-    canvas := self canvas.
-    canvas hideSelection.
-
-    itemsView isView ifFalse:[
-        "/ a component - has its own collection (and therefore indexing) - sigh
-        idx := idx - ((1 to:idx-1) count:[:i | (parentItem children at:i) contents view isView]).
-        parentItemsView changeSequenceOrderFor:itemsView to:idx.
-    ] ifTrue:[
-        "/ a view - has its own collection (and therefore indexing) - sigh
-        idx := idx - ((1 to:idx-1) count:[:i | (parentItem children at:i) contents view isView not]).
-        parentItemsView changeSequenceOrderFor:itemsView to:idx.
-    ].
-
-    parentItemsView specClass isLayoutContainer ifFalse:[
-        "/ spVw components notEmptyOrNil ifTrue:[ self halt ].
-        parentItemsView subViews do:[:v| v raise ].
-    ].
-    canvas showSelection.
-    self selectNode:item.
+"/    (    (item := self selectedNode) isNil
+"/     or:[(parentItem := item parent) isNil
+"/     or:[(size := parentItem children size) < 2
+"/     or:[(idx  := parentItem indexOfChild:item) == 0]]]
+"/    ) ifTrue:[
+"/        ^ self
+"/    ].
+"/
+"/    idx := idx + anIndex.
+"/
+"/    idx < 1 ifTrue:[idx := size]
+"/           ifFalse:[idx > size ifTrue:[idx := 1]].
+"/
+"/    self setSelection:nil.
+"/    model remove:item.
+"/    model add:item beforeIndex:idx below:parentItem.
+"/
+"/    idx := parentItem indexOfChild:item.
+"/    itemsView := item contents view.
+"/    parentItemsView := parentItem contents view.
+"/
+"/    canvas := self canvas.
+"/    canvas hideSelection.
+"/
+"/    itemsView isView ifFalse:[
+"/        "/ a component - has its own collection (and therefore indexing) - sigh
+"/        idx := idx - ((1 to:idx-1) count:[:i | (parentItem children at:i) contents view isView]).
+"/        parentItemsView changeSequenceOrderFor:itemsView to:idx.
+"/    ] ifTrue:[
+"/        "/ a view - has its own collection (and therefore indexing) - sigh
+"/        idx := idx - ((1 to:idx-1) count:[:i | (parentItem children at:i) contents view isView not]).
+"/        parentItemsView changeSequenceOrderFor:itemsView to:idx.
+"/    ].
+"/
+"/    parentItemsView specClass isLayoutContainer ifFalse:[
+"/        "/ spVw components notEmptyOrNil ifTrue:[ self halt ].
+"/        parentItemsView subViews do:[:v| v raise ].
+"/    ].
+"/    canvas showSelection.
+"/    self selectNode:item.
+
+    "Modified (format): / 07-03-2019 / 10:56:06 / Stefan Vogel"
 ! !
 
 !UIPainter class methodsFor:'documentation'!