MenuEditor.st
changeset 1610 cb3e093aa6d5
parent 1609 3ebd61486dc9
child 1614 46cc531eecc6
equal deleted inserted replaced
1609:3ebd61486dc9 1610:cb3e093aa6d5
  1322     "indicator clicked at line number; toggle expand of item at line
  1322     "indicator clicked at line number; toggle expand of item at line
  1323     "
  1323     "
  1324     |item|
  1324     |item|
  1325 
  1325 
  1326     item := listOfItems at:atLine ifAbsent:nil.
  1326     item := listOfItems at:atLine ifAbsent:nil.
  1327     item ifNotNil:[ item toggleExpand ].
  1327     item ifNotNil:[
       
  1328         item toggleExpand.
       
  1329         self hasSelection ifFalse:[
       
  1330             self selectedItem:item
       
  1331         ]
       
  1332     ].
  1328 ! !
  1333 ! !
  1329 
  1334 
  1330 !MenuEditor methodsFor:'aspects'!
  1335 !MenuEditor methodsFor:'aspects'!
  1331 
  1336 
  1332 canCreateDelayedMenuChannel
  1337 canCreateDelayedMenuChannel
  1867     newSelectedItem := listOfItems at:anIndex ifAbsent:nil.
  1872     newSelectedItem := listOfItems at:anIndex ifAbsent:nil.
  1868     oldSelectedItem == newSelectedItem ifTrue:[
  1873     oldSelectedItem == newSelectedItem ifTrue:[
  1869 	^ true
  1874 	^ true
  1870     ].
  1875     ].
  1871     ^ self askForItemModification
  1876     ^ self askForItemModification
       
  1877 !
       
  1878 
       
  1879 hasSelection
       
  1880     "returns true if a selection exists
       
  1881     "
       
  1882     ^ selectionHolder value size ~~ 0
  1872 !
  1883 !
  1873 
  1884 
  1874 selectedItem
  1885 selectedItem
  1875     "returns the selected item or nil (none or multiple selected)
  1886     "returns the selected item or nil (none or multiple selected)
  1876     "
  1887     "