move columns up or down
authorca
Wed, 10 Jun 2009 17:20:46 +0200
changeset 25581acb2765094d
parent 2557 befc1c216287
child 2559 04b2605a66b2
move columns up or down
DataSetBuilder.st
     1.1 --- a/DataSetBuilder.st	Wed Jun 10 15:25:54 2009 +0200
     1.2 +++ b/DataSetBuilder.st	Wed Jun 10 17:20:46 2009 +0200
     1.3 @@ -4156,14 +4156,17 @@
     1.4  doMoveColumn:upOrDown
     1.5      "move selected column up or down"
     1.6  
     1.7 -    |idx list label col size|
     1.8 +    |idx list label col size tabIndex|
     1.9  
    1.10      (idx := self singleSelectedColumnIndex) == 0 ifTrue:[^self].
    1.11      list := self seqList.
    1.12      size := list size.
    1.13  
    1.14 -    size == 1 ifTrue:[^self].
    1.15 +    size > 1 ifFalse:[ ^ self ].
    1.16 +
    1.17      selectedColumnIndex := 0.
    1.18 +    tabIndex := self tabModel value.
    1.19 +
    1.20      label := list at:idx.
    1.21      col   := columns at:idx.
    1.22      list    removeIndex:idx.
    1.23 @@ -4177,9 +4180,12 @@
    1.24                     ifFalse:[idx := idx + 1]
    1.25      ].
    1.26      columns add:col   beforeIndex:idx.
    1.27 -    list    add:label beforeIndex:idx.  
    1.28 +    list    add:label beforeIndex:idx.
    1.29 +
    1.30      self selectedColumnModel value:idx.
    1.31      self updateColumnView.
    1.32 +    self tabModel value:tabIndex.
    1.33 +
    1.34      self setModified.
    1.35  !
    1.36