| 237 | } |
| 238 | |
| 239 | void ClearClipboard() |
| 240 | { |
| 241 | if (wxTheClipboard->Open()) |
| 242 | { |
| 243 | // Clear the data from the clipboard, so that the next paste doesn't |
| 244 | // attempt to import whatever the user copied from the OS in a prior |
| 245 | // action. |
| 246 | const auto success = wxTheClipboard->SetData(safenew wxTextDataObject); |
| 247 | assert(success); |
| 248 | wxTheClipboard->Clear(); |
| 249 | wxTheClipboard->Close(); |
| 250 | } |
| 251 | } |
| 252 | |
| 253 | void OnCut(const CommandContext &context) |
| 254 | { |