UIPainterView.st
changeset 131 715b3dbba87d
parent 128 9779b7459a1c
child 134 d5ab85ec27fd
equal deleted inserted replaced
130:ffa9ea02d276 131:715b3dbba87d
   288 
   288 
   289 selectNames:aStringOrCollection
   289 selectNames:aStringOrCollection
   290     |prop coll s|
   290     |prop coll s|
   291 
   291 
   292     (aStringOrCollection isNil or:[aStringOrCollection isEmpty]) ifTrue:[
   292     (aStringOrCollection isNil or:[aStringOrCollection isEmpty]) ifTrue:[
   293         ^ self unselect
   293         ^ self select:nil
   294     ].
   294     ].
   295 
   295 
   296     (s := aStringOrCollection) isString ifFalse:[
   296     (s := aStringOrCollection) isString ifFalse:[
   297         s size == 1 ifTrue:[
   297         s size == 1 ifTrue:[
   298             s := s first
   298             s := s first
   303                 (prop := self propertyOfName:aName) notNil ifTrue:[
   303                 (prop := self propertyOfName:aName) notNil ifTrue:[
   304                     coll add:(prop view)
   304                     coll add:(prop view)
   305                 ]
   305                 ]
   306             ].
   306             ].
   307             coll size == 1 ifTrue:[ ^ self select:(coll at:1) ].
   307             coll size == 1 ifTrue:[ ^ self select:(coll at:1) ].
   308             coll size == 0 ifTrue:[ ^ self unselect ].
   308             coll size == 0 ifTrue:[ ^ self select:nil ].
   309 
   309 
   310           ^ self select:coll.
   310           ^ self select:coll.
   311         ]
   311         ]
   312     ].
   312     ].
   313 
   313 
   314     prop := self propertyOfName:s.
   314     prop := self propertyOfName:s.
   315     prop isNil ifTrue:[^ self unselect]
   315     prop isNil ifTrue:[^ self select:nil]
   316               ifFalse:[^ self select:(prop view)]
   316               ifFalse:[^ self select:(prop view)]
   317 
   317 
   318 ! !
   318 ! !
   319 
   319 
   320 !UIPainterView methodsFor:'change & update'!
   320 !UIPainterView methodsFor:'change & update'!
   389     |specs coll|
   389     |specs coll|
   390 
   390 
   391     coll := self minSetOfSuperViews:(self selection).
   391     coll := self minSetOfSuperViews:(self selection).
   392 
   392 
   393     coll notNil ifTrue:[
   393     coll notNil ifTrue:[
   394         self unselect.
   394         self select:nil.
   395         specs := coll collect:[:aView| self fullSpecFor:aView ].
   395         specs := coll collect:[:aView| self fullSpecFor:aView ].
   396         self setSelection:specs
   396         self setSelection:specs
   397     ].
   397     ].
   398 
   398 
   399 
   399 
   407 
   407 
   408     coll := self minSetOfSuperViews:(self selection).
   408     coll := self minSetOfSuperViews:(self selection).
   409 
   409 
   410     coll notNil ifTrue:[
   410     coll notNil ifTrue:[
   411         listHolder disableNotificationsWhileEvaluating:[
   411         listHolder disableNotificationsWhileEvaluating:[
   412             self unselect.
   412             self select:nil.
   413             specs := coll collect:[:aView| self fullSpecFor:aView ].
   413             specs := coll collect:[:aView| self fullSpecFor:aView ].
   414             text  := self transactionTextFor:coll.
   414             text  := self transactionTextFor:coll.
   415 
   415 
   416             undoHistory transaction:#cut text:text do:[
   416             undoHistory transaction:#cut text:text do:[
   417                 coll reverseDo:[:o||p|
   417                 coll reverseDo:[:o||p|
   449     frame := self singleSelection.
   449     frame := self singleSelection.
   450 
   450 
   451     (self canPasteInto:frame) ifFalse:[
   451     (self canPasteInto:frame) ifFalse:[
   452         frame := self
   452         frame := self
   453     ].
   453     ].
   454     self unselect.
   454     self select:nil.
   455 
   455 
   456     newSel  := OrderedCollection new.
   456     newSel  := OrderedCollection new.
   457     builder := UIBuilder new.
   457     builder := UIBuilder new.
   458 
   458 
   459     keepLayout ifFalse:[
   459     keepLayout ifFalse:[
  1111 
  1111 
  1112 removeAll
  1112 removeAll
  1113     "remove all objects and properties
  1113     "remove all objects and properties
  1114     "
  1114     "
  1115     listHolder disableNotificationsWhileEvaluating:[
  1115     listHolder disableNotificationsWhileEvaluating:[
  1116         self unselect.
  1116         self select:nil.
  1117         listHolder  removeAll.
  1117         listHolder  removeAll.
  1118         undoHistory reinitialize.
  1118         undoHistory reinitialize.
  1119     ]
  1119     ]
  1120 ! !
  1120 ! !
  1121 
  1121