]> git.saurik.com Git - wxWidgets.git/blobdiff - src/stc/ScintillaWX.cpp
compilation fix for yet another broken version of mingw (ENSESSION_LOGOFF not defined)
[wxWidgets.git] / src / stc / ScintillaWX.cpp
index 5f04433a23c980cfdf4765129fd2de8017ebbf5a..059dd4afaae05a5d43f6a991792d3eeffd47bee8 100644 (file)
@@ -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;
 }