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:
@@ -355,13 +355,14 @@ void ScintillaWX::Paste() {
|
|||||||
|
|
||||||
|
|
||||||
bool ScintillaWX::CanPaste() {
|
bool ScintillaWX::CanPaste() {
|
||||||
bool canPaste;
|
bool canPaste = FALSE;
|
||||||
|
|
||||||
wxTheClipboard->Open();
|
|
||||||
wxTheClipboard->UsePrimarySelection();
|
|
||||||
canPaste = wxTheClipboard->IsSupported(wxUSE_UNICODE ? wxDF_UNICODETEXT : wxDF_TEXT);
|
|
||||||
wxTheClipboard->Close();
|
|
||||||
|
|
||||||
|
if (! wxTheClipboard->IsOpened()) {
|
||||||
|
wxTheClipboard->Open();
|
||||||
|
wxTheClipboard->UsePrimarySelection();
|
||||||
|
canPaste = wxTheClipboard->IsSupported(wxUSE_UNICODE ? wxDF_UNICODETEXT : wxDF_TEXT);
|
||||||
|
wxTheClipboard->Close();
|
||||||
|
}
|
||||||
return canPaste;
|
return canPaste;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -355,13 +355,14 @@ void ScintillaWX::Paste() {
|
|||||||
|
|
||||||
|
|
||||||
bool ScintillaWX::CanPaste() {
|
bool ScintillaWX::CanPaste() {
|
||||||
bool canPaste;
|
bool canPaste = FALSE;
|
||||||
|
|
||||||
wxTheClipboard->Open();
|
|
||||||
wxTheClipboard->UsePrimarySelection();
|
|
||||||
canPaste = wxTheClipboard->IsSupported(wxUSE_UNICODE ? wxDF_UNICODETEXT : wxDF_TEXT);
|
|
||||||
wxTheClipboard->Close();
|
|
||||||
|
|
||||||
|
if (! wxTheClipboard->IsOpened()) {
|
||||||
|
wxTheClipboard->Open();
|
||||||
|
wxTheClipboard->UsePrimarySelection();
|
||||||
|
canPaste = wxTheClipboard->IsSupported(wxUSE_UNICODE ? wxDF_UNICODETEXT : wxDF_TEXT);
|
||||||
|
wxTheClipboard->Close();
|
||||||
|
}
|
||||||
return canPaste;
|
return canPaste;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user