Ticket #1266 (closed defect: fixed)
discrepancy of clipboard items and clipping cache
|Reported by:||mikus||Owned by:||godiard|
Test case (I used Terminal): [Latest occurrence was on soas-2-beta on an XO-1, but the problem occurs in earlier versions of Sugar as well.]
(1) Individually copy (one by one) a sequence of clippings "one" "two" "three" "four" "five" to the clipboard. Frame will show five icons, with "five" in the lower left corner, and the other icons above it in the left edge of Frame ("one" topmost).
(2) Click on "three" - this will select what gets to be pasted.
(3) Perform 'paste' (e.g., from within Terminal) and verify that what got copied out of the clipboard was clipping "three".
(4) In Frame, go to the icon for clipping "three". Click on 'Remove' in that icon's palette. Verify that Frame now shows four icons (called, from top to bottom, "one" "two" "four" five").
(5) Perform 'paste' (e.g., from within Terminal) and verify that what got copied out of the clipboard was still clipping "three".
To me, http://wiki.sugarlabs.org/go/Design_Team/Specifications/Clipboard is confusing:
(A) The text: "The paste operation will not change the selected source, such that subsequent pastes will repeatedly paste the same clipping" appears to prohibit changing the source of which clipping will be copied by a follow-on paste, even though the originally selected clipping might have in the meantime been explicitly removed from the clipboard.
(B) The text: "an alternate paste-and-remove operation will paste the currently selected source and remove the source clipping from the clipboard in one step. When the clipping is removed, the previous clipping (the one that was below it in the stack) will become the new source" appears to allow a 'Remove' to change which clipping gets selected as the source for a follow-on paste.
I believe that behavior (A) is actually a bug - it ought to be more important that Frame show the clippings that can be copied, than to preserve the (invisible!) repeatability of the previous paste operation.
When the selected clipping is removed from Frame, a different clipping needs to be selected. [In the test case, if "three" is the selected clipping, "two" ought to be automatically selected when "three" is removed.]