]> git.saurik.com Git - wxWidgets.git/blobdiff - src/stc/ScintillaWX.cpp
Applied patch [ 578052 ] Doc/View and recursion problems
[wxWidgets.git] / src / stc / ScintillaWX.cpp
index ec2297af18a9f9cc95ac7703d3787a8b04b579b4..50bfac2f18b2b53a92956a4946ea0e883c52459c 100644 (file)
@@ -110,7 +110,7 @@ public:
             CaptureMouse();
         }
         else {
-            ReleaseMouse();
+            if (HasCapture()) ReleaseMouse();
         }
         return retval;
     }
@@ -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();
 
@@ -575,7 +578,8 @@ void ScintillaWX::DoCommand(int ID) {
 
 
 void ScintillaWX::DoContextMenu(Point pt) {
-    ContextMenu(pt);
+    if (displayPopupMenu)
+        ContextMenu(pt);
 }
 
 void ScintillaWX::DoOnListBox() {