Merged V2.0 to HEAD

svn merge svn://svn.alfresco.com:3691/alfresco/BRANCHES/V2.0@5198 svn://svn.alfresco.com:3691/alfresco/BRANCHES/V2.0@5199 .
      - WCM Tutorial bootstrap removal
   svn merge svn://svn.alfresco.com:3691/alfresco/BRANCHES/V2.0@5199 svn://svn.alfresco.com:3691/alfresco/BRANCHES/V2.0@5200 .
      - AWC-1141: Clipboard missing item


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5201 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2007-02-20 15:18:16 +00:00
parent 7fd19e7e88
commit 1d379ddf4b

View File

@@ -152,15 +152,16 @@ public class ClipboardBean
if (index == -1) if (index == -1)
{ {
// paste all // paste all
for (int i=0; i<this.items.size(); i++) List<ClipboardItem> toRemove = new ArrayList<ClipboardItem>();
for (ClipboardItem item : this.items)
{ {
ClipboardItem item = this.items.get(i);
if (performClipboardOperation(item, action) == true) if (performClipboardOperation(item, action) == true)
{ {
// if cut operation then remove item from the clipboard // if cut operation then remove item from the clipboard
if (item.getMode() == ClipboardStatus.CUT) if (item.getMode() == ClipboardStatus.CUT)
{ {
this.items.remove(i); // remember which items to remove.
toRemove.add(item);
} }
} }
} }
@@ -170,6 +171,14 @@ public class ClipboardBean
{ {
this.items.clear(); this.items.clear();
} }
else if (toRemove.size() > 0)
{
// remove the items that were cut above
for (ClipboardItem item : toRemove)
{
this.items.remove(item);
}
}
} }
else else
{ {