UsePrimarySelection

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15680 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn 2002-05-27 17:50:55 +00:00
parent c73b439f80
commit 95b3e2768f
2 changed files with 6 additions and 0 deletions

View File

@ -320,6 +320,7 @@ void ScintillaWX::Copy() {
SelectionText st;
CopySelectionRange(&st);
wxTheClipboard->Open();
wxTheClipboard->UsePrimarySelection();
wxString text = stc2wx(st.s, st.len);
wxTheClipboard->SetData(new wxTextDataObject(text));
wxTheClipboard->Close();
@ -335,6 +336,7 @@ void ScintillaWX::Paste() {
bool gotData;
wxTheClipboard->Open();
wxTheClipboard->UsePrimarySelection();
gotData = wxTheClipboard->GetData(data);
wxTheClipboard->Close();
if (gotData) {
@ -354,6 +356,7 @@ bool ScintillaWX::CanPaste() {
bool canPaste;
wxTheClipboard->Open();
wxTheClipboard->UsePrimarySelection();
canPaste = wxTheClipboard->IsSupported(wxUSE_UNICODE ? wxDF_UNICODETEXT : wxDF_TEXT);
wxTheClipboard->Close();

View File

@ -320,6 +320,7 @@ void ScintillaWX::Copy() {
SelectionText st;
CopySelectionRange(&st);
wxTheClipboard->Open();
wxTheClipboard->UsePrimarySelection();
wxString text = stc2wx(st.s, st.len);
wxTheClipboard->SetData(new wxTextDataObject(text));
wxTheClipboard->Close();
@ -335,6 +336,7 @@ void ScintillaWX::Paste() {
bool gotData;
wxTheClipboard->Open();
wxTheClipboard->UsePrimarySelection();
gotData = wxTheClipboard->GetData(data);
wxTheClipboard->Close();
if (gotData) {
@ -354,6 +356,7 @@ bool ScintillaWX::CanPaste() {
bool canPaste;
wxTheClipboard->Open();
wxTheClipboard->UsePrimarySelection();
canPaste = wxTheClipboard->IsSupported(wxUSE_UNICODE ? wxDF_UNICODETEXT : wxDF_TEXT);
wxTheClipboard->Close();