Changed CanPaste to just check IsSupported.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12158 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
91cddacfe0
commit
e26c0634d0
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user