Patch #2482 2008-05-25 06:33

siegelord

Block Pasting Bugfix
Download
2482-Block_Pasting.patch (1.1 KB)
Category
Application::Bugfix
Status
Accepted
Close date
2008-06-17 12:14
Assigned to
mortenmacfly
Index: src/sdk/wxscintilla/src/ScintillaWX.cpp
===================================================================
--- src/sdk/wxscintilla/src/ScintillaWX.cpp    (revision 5081)
+++ src/sdk/wxscintilla/src/ScintillaWX.cpp    (working copy)
@@ -502,7 +502,7 @@
 
     if (wxTheClipboard->Open()) {
         wxTheClipboard->UsePrimarySelection(false);
-        wxCustomDataObject selData(wxDF_PRIVATE);
+        wxCustomDataObject selData(wxDataFormat(wxString(wxT("application/x-cbrectdata"))));
         bool gotRectData = wxTheClipboard->GetData(selData);
 
         if (gotRectData && selData.GetSize()>1) {
@@ -555,7 +555,7 @@
         // object for local use that remembers what kind of selection was made (stream or
         // rectangular).
         wxDataObjectComposite* obj = new wxDataObjectComposite();
-        wxCustomDataObject* rectData = new wxCustomDataObject (wxDF_PRIVATE);
+        wxCustomDataObject* rectData = new wxCustomDataObject (wxDataFormat(wxString(wxT("application/x-cbrectdata"))));
 
         char* buffer = new char[st.len+1];
         buffer[0] = (st.rectangular)? (char)1 : (char)0;