UIPainterView.st
changeset 2366 69ed2aeb7e3d
parent 2362 a6a7ef98fdc3
child 2367 6684f50b22cd
--- a/UIPainterView.st	Fri Jun 20 11:39:27 2008 +0200
+++ b/UIPainterView.st	Mon Jun 23 19:25:26 2008 +0200
@@ -397,7 +397,7 @@
         at:aPointOrNil
 !
 
-pasteSpecifications:aSpecificationOrList keepLayout:keepLayout keepPosition:keepPosition at:aPointOrNil
+pasteSpecifications:aSpecificationOrList keepLayout:keepLayout keepPosition:keepPosition at:aPointOrNilOrKeep
     "add the specs to the object view; returns list of pasted widgets"
 
     |specsToPaste pasteOffset builder newSel 
@@ -405,13 +405,14 @@
 
     treeView askForSelectionChangeAllowed ifFalse:[^ nil].
 
-    (self window sensor shiftDown
-    or:[ self window sensor ctrlDown ]) ifTrue:[
+    (aPointOrNilOrKeep == #keep
+    or:[ self window sensor shiftDown
+    or:[ self window sensor ctrlDown ]]) ifTrue:[
         "/ paste into the selection
         containerToPasteInto := self singleSelection.
     ] ifFalse:[
         "/ ignore the selection and paste where we drop!!
-        pastePoint := aPointOrNil.
+        pastePoint := aPointOrNilOrKeep.
         pastePoint isNil ifTrue:[
             pastePoint := device 
                                 translatePoint:(self sensor mousePoint)
@@ -523,7 +524,11 @@
 
     |sel|
 
-    sel := self pasteSpecifications:(self getClipboardObject) keepLayout:true.
+    sel := self 
+            pasteSpecifications:(self getClipboardObject)
+            keepLayout:true
+            keepPosition:true
+            at:#keep.
     self changeSelectionAfterPasteOf:sel.
 !