allow the base class to participate in the CanPaste decision
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20512 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user