diff -r bed277fdbd85 -r 229b3e455c98 UIPainterView.st --- a/UIPainterView.st Wed Jun 08 20:15:22 2005 +0200 +++ b/UIPainterView.st Tue Jun 28 14:44:38 2005 +0200 @@ -494,45 +494,45 @@ !UIPainterView methodsFor:'drag & drop'! canDrop:something - "returns true if something can be droped - " + "returns true if something can be dropped" + (something size == 1 and:[self enabled and:[self numberOfSelections <= 1]]) ifTrue:[ - ^ something first theObject isKindOf:UISpecification + ^ something first theObject isKindOf:UISpecification ]. ^ false ! canPaste - "returns true if something to be past exists and can be paste into - the selection if exists - " + "returns true if there is something which can be pasted in the clipboard" + ^ self canPaste:(self getClipboardObject) ! canPaste:something - "returns true if something could be paste - " + "returns true if something could be pasted" + |el size| ((size := self numberOfSelections) <= 1 and:[self enabled]) ifFalse:[ - ^ false + ^ false ]. - something isCollection ifTrue:[something notEmpty ifTrue:[el := something first]] - ifFalse:[el := something]. + something isCollection + ifTrue:[something notEmpty ifTrue:[el := something first]] + ifFalse:[el := something]. (el isKindOf:UISpecification) ifFalse:[ - ^ false + ^ false ]. size == 1 ifTrue:[ - ^ self canPasteInto:(self singleSelection) + ^ self canPasteInto:(self singleSelection) ]. - ^ true + ^ true ! canPasteInto:aView - "can paste into a view - " + "return true, if I can paste into a view" + |prop| aView isNil ifTrue:[ ^ false ].