| 1 | Index: src/lib/platform/COSXClipboard.cpp |
| 2 | =================================================================== |
| 3 | --- src/lib/platform/COSXClipboard.cpp (revision 1169) |
| 4 | +++ src/lib/platform/COSXClipboard.cpp (revision 1170) |
| 5 | @@ -87,6 +87,7 @@ |
| 6 | void |
| 7 | COSXClipboard::add(EFormat format, const CString & data) |
| 8 | { |
| 9 | + bool emptied = false; |
| 10 | if (m_pboard == NULL) |
| 11 | return; |
| 12 | |
| 13 | @@ -105,9 +106,14 @@ |
| 14 | |
| 15 | // integ tests showed that if you call add(...) twice, then the |
| 16 | // second call will actually fail to set clipboard data. calling |
| 17 | - // empty() seems to solve this problem. |
| 18 | - empty(); |
| 19 | - |
| 20 | + // empty() seems to solve this problem. but, only clear the clipboard |
| 21 | + // for the first converter, otherwise further converters will wipe out |
| 22 | + // what we just added. |
| 23 | + if (!emptied) { |
| 24 | + empty(); |
| 25 | + emptied = true; |
| 26 | + } |
| 27 | + |
| 28 | PasteboardPutItemFlavor( |
| 29 | m_pboard, |
| 30 | (PasteboardItemID) 0, |