]> git.saurik.com Git - wxWidgets.git/blobdiff - src/stc/ScintillaWX.cpp
updates from Adrián González Alba
[wxWidgets.git] / src / stc / ScintillaWX.cpp
index 2a39569a98805d9a7a5648e294ac8e3cc43e1555..764048fbc2ef05e6af89c98e3e73cbe9021e57cb 100644 (file)
@@ -483,7 +483,10 @@ void ScintillaWX::Paste() {
     if (gotData) {
         wxString   text = wxTextBuffer::Translate(data.GetText(),
                                                   wxConvertEOLMode(pdoc->eolMode));
+  data.SetText(wxEmptyString); // free the data object content
         wxWX2MBbuf buf = (wxWX2MBbuf)wx2stc(text);
+  text = wxEmptyString; // free text
+
         int        len = strlen(buf);
         pdoc->InsertString(currentPos, buf, len);
         SetEmptySelection(currentPos + len);
@@ -827,13 +830,15 @@ void ScintillaWX::DoLeftButtonDown(Point pt, unsigned int curTime, bool shift, b
 }
 
 void ScintillaWX::DoLeftButtonUp(Point pt, unsigned int curTime, bool ctrl) {
+    ButtonUp(pt, curTime, ctrl);
 #if wxUSE_DRAG_AND_DROP
     if (startDragTimer->IsRunning()) {
         startDragTimer->Stop();
+        SetDragPosition(invalidPosition);
         SetEmptySelection(PositionFromLocation(pt));
+        ShowCaretAtCurrentPosition();
     }
 #endif // wxUSE_DRAG_AND_DROP
-    ButtonUp(pt, curTime, ctrl);
 }
 
 void ScintillaWX::DoLeftButtonMove(Point pt) {