dont paste into scrollable selectionInListViews ...
authorClaus Gittinger <cg@exept.de>
Tue, 08 Apr 1997 01:09:51 +0200
changeset 96 73725336b4fe
parent 95 c20189d75ec3
child 97 1887c994511b
dont paste into scrollable selectionInListViews ...
UIObjectView.st
UIPainterView.st
--- a/UIObjectView.st	Tue Apr 08 00:47:25 1997 +0200
+++ b/UIObjectView.st	Tue Apr 08 01:09:51 1997 +0200
@@ -1347,15 +1347,28 @@
 canPasteInto:something
     "can paste into something ?
     "
+
+    |theView theSpec|
+
     something notNil ifTrue:[
         something isCollection ifFalse:[
-            ^ something specClass supportsSubComponents
+            theView := something
+        ] ifTrue:[
+            something size == 1 ifTrue:[
+                theView := (something at:1)
+            ]
         ].
-        something size == 1 ifTrue:[
-            ^ (something at:1) specClass supportsSubComponents
+        theView notNil ifTrue:[
+            theSpec := self specFor:theView.
+            theSpec isNil ifTrue:[
+                self halt.
+            ].
+            ^ theSpec class supportsSubComponents
         ]
     ].
     ^ false
+
+    "Modified: 8.4.1997 / 01:08:06 / cg"
 !
 
 canSelect:something
--- a/UIPainterView.st	Tue Apr 08 00:47:25 1997 +0200
+++ b/UIPainterView.st	Tue Apr 08 01:09:51 1997 +0200
@@ -245,6 +245,7 @@
     self elementChangedSize:frame.
     self changed:#tree
 
+    "Modified: 8.4.1997 / 01:08:15 / cg"
 !
 
 pasteWithLayout
@@ -263,10 +264,12 @@
     testMode ifFalse:[
         anObjectOrCollection size == 1 ifTrue:[
             spec := (anObjectOrCollection at:1) theObject.
-          ^ (spec isKindOf:UISpecification)
+            ^ (spec isKindOf:UISpecification)
         ]
     ].
     ^ false
+
+    "Modified: 8.4.1997 / 01:01:50 / cg"
 !
 
 drop:anObjectOrCollection at:aPoint