]> git.saurik.com Git - wxWidgets.git/blobdiff - src/stc/ScintillaWX.cpp
fixes for drop source and for capturing the mouse
[wxWidgets.git] / src / stc / ScintillaWX.cpp
index 7e44f56b3eed89c6e8fbbf35fdf57a33ba6a4250..cd0064be5c4003ef62e2d8cfbc20ffc614af190e 100644 (file)
@@ -96,7 +96,7 @@ void ScintillaWX::Finalise() {
 
 
 void ScintillaWX::StartDrag() {
-    wxDropSource        source;
+    wxDropSource        source(wMain.GetID());
     wxTextDataObject    data(dragChars);
     wxDragResult        result;
 
@@ -129,9 +129,9 @@ void ScintillaWX::SetTicking(bool on) {
 
 
 void ScintillaWX::SetMouseCapture(bool on) {
-    if (on)
+    if (on && !capturedMouse)
         wMain.GetID()->CaptureMouse();
-    else
+    else if (!on && capturedMouse)
         wMain.GetID()->ReleaseMouse();
     capturedMouse = on;
 }