UIPainterView.st
changeset 1347 c4046d0b638e
parent 1338 3c1a528c50db
child 1358 c0116e25a2ac
equal deleted inserted replaced
1346:0793db434b21 1347:c4046d0b638e
  1576                 selection := anObject
  1576                 selection := anObject
  1577             ] ifFalse:[
  1577             ] ifFalse:[
  1578                 selection := OrderedCollection with:selection with:anObject
  1578                 selection := OrderedCollection with:selection with:anObject
  1579             ]
  1579             ]
  1580         ] ifTrue:[
  1580         ] ifTrue:[
  1581             selection add:anObject
  1581             "/ to enforce the change-message (value is identical to oldValue)
       
  1582             selection isList ifTrue:[
       
  1583                 selection add:anObject
       
  1584             ] ifFalse:[
       
  1585                 selection := selection asOrderedCollection.
       
  1586                 selection := selection copyWith:anObject
       
  1587             ]
  1582         ].
  1588         ].
  1583         self showSelected:anObject.
  1589         self showSelected:anObject.
  1584         treeView cvsSelectionAdd:anObject.
  1590         treeView cvsSelectionAdd:anObject.
  1585     ]
  1591     ]
  1586 
  1592 
  1587 
  1593     "Modified: / 11.2.2000 / 01:39:05 / cg"
  1588 !
  1594 !
  1589 
  1595 
  1590 removeFromSelection:anObject
  1596 removeFromSelection:anObject
  1591     "remove an object from the selection
  1597     "remove an object from the selection
  1592     "
  1598     "
  1593     (self isSelected:anObject) ifTrue:[
  1599     (self isSelected:anObject) ifTrue:[
  1594         self showUnselected:anObject.
  1600         self showUnselected:anObject.
  1595 
  1601 
  1596         selection size > 1 ifTrue:[
  1602         selection size > 1 ifTrue:[
  1597             selection remove:anObject ifAbsent:nil.
  1603             selection isList ifTrue:[
       
  1604                 selection remove:anObject ifAbsent:nil
       
  1605             ] ifFalse:[
       
  1606                 "/ to enforce the change-message (value is identical to oldValue)
       
  1607                 selection := selection asOrderedCollection.
       
  1608                 selection := selection copyWithout:anObject
       
  1609             ].
  1598             self showSelection.
  1610             self showSelection.
  1599         ] ifFalse:[
  1611         ] ifFalse:[
  1600             selection := nil
  1612             selection := nil
  1601         ].
  1613         ].
  1602         treeView cvsSelectionRemove:anObject.
  1614         treeView cvsSelectionRemove:anObject.
  1603     ]
  1615     ]
  1604 
  1616 
       
  1617     "Modified: / 11.2.2000 / 01:41:11 / cg"
  1605 !
  1618 !
  1606 
  1619 
  1607 select:something
  1620 select:something
  1608     "change selection to something
  1621     "change selection to something
  1609     "         
  1622     "