[ https://issues.apache.org/jira/browse/PIVOT-929?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13940673#comment-13940673 ]
Sandro Martini commented on PIVOT-929: -------------------------------------- Patch applied in 2.0.x (and all seems to be good), but still not merged into trunk (i'll do it in a few days). Unless objections next week I'll mark this as resolved. Karel, thank you very much for the help (and the patch) on this :-) . > The Clipboard content is cleared by qued callback > ------------------------------------------------- > > Key: PIVOT-929 > URL: https://issues.apache.org/jira/browse/PIVOT-929 > Project: Pivot > Issue Type: Bug > Affects Versions: 2.0.3 > Reporter: Karel Hübl > Assignee: Sandro Martini > Fix For: 2.0.4, 2.1 > > Attachments: Pivot-929-2.0.x_rev1539956.patch > > > The Clipboard content is cleared by qued callback. > We used LocalManifest value map to store references to POJO representing > TreeView items participating in Cut and Paste. > > When we put LocalManifest to Clipboard using Clipboard.setContent, then we > expected to get it back later using Clipboard.getContent(). > > However this works only for the first time. Next, when we create new > LocalManifest instance and put it to Clipboard we never get it back. > The reason for this is implementation of > org.apache.pivot.wtk.Clipboard.setContent method. The inner ClipboardOwner > class clears the LocalManifest stored in Clipboard.content static variable. > The problém is, that the call to lostOwnerhip notification method is not > called directly from AWT Clipboard.setContents method, but queued to AWT > Event queue. > > So the ClipboardOwner from previous call to > org.apache.pivot.wtk.Clipboard.setContent method, clears the new > Clipboard.content field immediately since it is executed later from AWT event > queue. > > This is not problem for text, image and files, because of propagation to AWT > clipboard. > Patch will be uploaded... -- This message was sent by Atlassian JIRA (v6.2#6252)