Support sorting of items in tree
authorStefan Vogel <sv@exept.de>
Tue, 26 Feb 2008 18:39:28 +0100
changeset 2311 67811bdeb0f5
parent 2310 ac9be9035f2c
child 2312 8b25e13ab035
Support sorting of items in tree
UIPainterView.st
--- a/UIPainterView.st	Tue Feb 26 18:39:19 2008 +0100
+++ b/UIPainterView.st	Tue Feb 26 18:39:28 2008 +0100
@@ -346,11 +346,13 @@
 !
 
 pasteBuffer
-    "add the objects in the paste-buffer to the object view"
-
-    |sel|
-
-    sel := self pasteSpecifications:(self getClipboardObject) keepLayout:false.
+    "add the objects in the paste-buffer to the object view; 
+     don't change the layout if more than a single item has been selected"
+
+    |sel clipboard|
+
+    clipboard := self getClipboardObject.
+    sel := self pasteSpecifications:clipboard keepLayout:(clipboard size > 1).
     self changeSelectionAfterPasteOf:sel.
 !
 
@@ -508,13 +510,12 @@
     "Modified: / 10.10.2001 / 14:15:12 / cg"
 !
 
-pasteWithLayout
-    "add the objects in the paste-buffer to the object view; 
-     don't change the layout"
+pasteWithoutLayout
+    "add the objects in the paste-buffer to the object view"
 
     |sel|
 
-    sel := self pasteSpecifications:(self getClipboardObject) keepLayout:true.
+    sel := self pasteSpecifications:(self getClipboardObject) keepLayout:false.
     self changeSelectionAfterPasteOf:sel.
 !