You can't paste if someone else already has the clipboard open...

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16761 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2002-08-25 04:20:18 +00:00
parent e4f0b986b9
commit 6ba338ecc3
2 changed files with 14 additions and 12 deletions

View File

@@ -355,13 +355,14 @@ void ScintillaWX::Paste() {
bool ScintillaWX::CanPaste() {
bool canPaste;
wxTheClipboard->Open();
wxTheClipboard->UsePrimarySelection();
canPaste = wxTheClipboard->IsSupported(wxUSE_UNICODE ? wxDF_UNICODETEXT : wxDF_TEXT);
wxTheClipboard->Close();
bool canPaste = FALSE;
if (! wxTheClipboard->IsOpened()) {
wxTheClipboard->Open();
wxTheClipboard->UsePrimarySelection();
canPaste = wxTheClipboard->IsSupported(wxUSE_UNICODE ? wxDF_UNICODETEXT : wxDF_TEXT);
wxTheClipboard->Close();
}
return canPaste;
}

View File

@@ -355,13 +355,14 @@ void ScintillaWX::Paste() {
bool ScintillaWX::CanPaste() {
bool canPaste;
wxTheClipboard->Open();
wxTheClipboard->UsePrimarySelection();
canPaste = wxTheClipboard->IsSupported(wxUSE_UNICODE ? wxDF_UNICODETEXT : wxDF_TEXT);
wxTheClipboard->Close();
bool canPaste = FALSE;
if (! wxTheClipboard->IsOpened()) {
wxTheClipboard->Open();
wxTheClipboard->UsePrimarySelection();
canPaste = wxTheClipboard->IsSupported(wxUSE_UNICODE ? wxDF_UNICODETEXT : wxDF_TEXT);
wxTheClipboard->Close();
}
return canPaste;
}