--- a/UIObjectView.st Fri Aug 08 16:43:46 2008 +0200
+++ b/UIObjectView.st Wed Aug 20 19:54:33 2008 +0200
@@ -1675,9 +1675,27 @@
pasteExtent
"paste the copied extent to all objects in the selection"
+ |heightToPaste widthToPaste|
+
CopiedExtent notNil ifTrue:[
- self transaction:#pasteExtent dimensionDo:[:v|
- self resize:v corner:(v computeOrigin + CopiedExtent)
+ widthToPaste := CopiedExtent x.
+ heightToPaste := CopiedExtent y.
+ ] ifFalse:[
+ CopiedLayout notNil ifTrue:[
+ CopiedLayout leftFraction = CopiedLayout rightFraction ifTrue:[
+ CopiedLayout topFraction = CopiedLayout bottomFraction ifTrue:[
+ widthToPaste := (CopiedLayout rightOffset - CopiedLayout leftOffset).
+ heightToPaste := (CopiedLayout bottomOffset - CopiedLayout topOffset).
+ ]
+ ]
+ ].
+ ].
+
+ widthToPaste notNil ifTrue:[
+ heightToPaste notNil ifTrue:[
+ self transaction:#pasteExtent dimensionDo:[:v|
+ self resize:v corner:(v computeOrigin + (widthToPaste@heightToPaste))
+ ]
]
]
!
@@ -1685,11 +1703,43 @@
pasteHeight
"paste the copied extent's height to all objects in the selection"
+ |heightToPaste|
+
CopiedExtent notNil ifTrue:[
+ heightToPaste := CopiedExtent y.
+ ] ifFalse:[
+ CopiedLayout notNil ifTrue:[
+ CopiedLayout topFraction = CopiedLayout bottomFraction ifTrue:[
+ heightToPaste := (CopiedLayout bottomOffset - CopiedLayout topOffset)
+ ]
+ ].
+ ].
+
+ heightToPaste notNil ifTrue:[
self transaction:#pasteHeight dimensionDo:[:v|
- self resize:v bottom:(v computeOrigin + CopiedExtent y)
- ]
- ]
+ self resize:v bottom:(v computeOrigin + heightToPaste)
+ ].
+ ^ self.
+ ].
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
!
pasteLayout
@@ -1705,9 +1755,21 @@
pasteWidth
"paste the copied extent's width to all objects in the selection"
+ |widthToPaste|
+
CopiedExtent notNil ifTrue:[
+ widthToPaste := CopiedExtent x.
+ ] ifFalse:[
+ CopiedLayout notNil ifTrue:[
+ CopiedLayout leftFraction = CopiedLayout rightFraction ifTrue:[
+ widthToPaste := (CopiedLayout rightOffset - CopiedLayout leftOffset)
+ ]
+ ].
+ ].
+
+ widthToPaste notNil ifTrue:[
self transaction:#pasteWidth dimensionDo:[:v|
- self resize:v right:(v computeOrigin + CopiedExtent x)
+ self resize:v right:(v computeOrigin + widthToPaste)
]
]
!