X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1bc54e325773bc504edffbc7031d58364350434a..aedcc0dc8266fbc73d6bb513bf6c6b0f17932afa:/src/stc/ScintillaWX.cpp diff --git a/src/stc/ScintillaWX.cpp b/src/stc/ScintillaWX.cpp index 5f04433a23..059dd4afaa 100644 --- a/src/stc/ScintillaWX.cpp +++ b/src/stc/ScintillaWX.cpp @@ -376,14 +376,16 @@ bool ScintillaWX::CanPaste() { bool canPaste = FALSE; bool didOpen; - if ( (didOpen = !wxTheClipboard->IsOpened()) ) - wxTheClipboard->Open(); + if (Editor::CanPaste()) { + if ( (didOpen = !wxTheClipboard->IsOpened()) ) + wxTheClipboard->Open(); - if (wxTheClipboard->IsOpened()) { - wxTheClipboard->UsePrimarySelection(FALSE); - canPaste = wxTheClipboard->IsSupported(wxUSE_UNICODE ? wxDF_UNICODETEXT : wxDF_TEXT); - if (didOpen) - wxTheClipboard->Close(); + if (wxTheClipboard->IsOpened()) { + wxTheClipboard->UsePrimarySelection(FALSE); + canPaste = wxTheClipboard->IsSupported(wxUSE_UNICODE ? wxDF_UNICODETEXT : wxDF_TEXT); + if (didOpen) + wxTheClipboard->Close(); + } } return canPaste; }