X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/91cddacfe014ae0b0afd78cfc866494f4b5e9090..e26c0634d0040057f09d902842c2b77aa9f0cbfc:/contrib/src/stc/ScintillaWX.cpp?ds=sidebyside diff --git a/contrib/src/stc/ScintillaWX.cpp b/contrib/src/stc/ScintillaWX.cpp index 023a0f92d0..1dfc0184a7 100644 --- a/contrib/src/stc/ScintillaWX.cpp +++ b/contrib/src/stc/ScintillaWX.cpp @@ -246,12 +246,12 @@ void ScintillaWX::Paste() { ClearSelection(); wxTextDataObject data; - bool canPaste; + bool gotData; wxTheClipboard->Open(); - canPaste = wxTheClipboard->GetData(data); + gotData = wxTheClipboard->GetData(data); wxTheClipboard->Close(); - if (canPaste) { + if (gotData) { wxString str = data.GetText(); int len = str.Length(); pdoc->InsertString(currentPos, str.c_str(), len); @@ -265,11 +265,10 @@ void ScintillaWX::Paste() { bool ScintillaWX::CanPaste() { - wxTextDataObject data; bool canPaste; wxTheClipboard->Open(); - canPaste = wxTheClipboard->GetData(data); + canPaste = wxTheClipboard->IsSupported( wxDF_TEXT ); wxTheClipboard->Close(); return canPaste;