X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9ce192d417eb9eb614bcf8510e91dac318706249..26993c4f64a7551050c597cd5f65e3c7f3066eaa:/contrib/src/stc/ScintillaWX.cpp diff --git a/contrib/src/stc/ScintillaWX.cpp b/contrib/src/stc/ScintillaWX.cpp index 5b82473a49..cd0064be5c 100644 --- a/contrib/src/stc/ScintillaWX.cpp +++ b/contrib/src/stc/ScintillaWX.cpp @@ -84,8 +84,9 @@ ScintillaWX::~ScintillaWX() { void ScintillaWX::Initialise() { //ScintillaBase::Initialise(); - dropTarget.SetScintilla(this); - stc->SetDropTarget(&dropTarget); + dropTarget = new wxSTCDropTarget; + dropTarget->SetScintilla(this); + stc->SetDropTarget(dropTarget); } @@ -95,7 +96,7 @@ void ScintillaWX::Finalise() { void ScintillaWX::StartDrag() { - wxDropSource source; + wxDropSource source(wMain.GetID()); wxTextDataObject data(dragChars); wxDragResult result; @@ -128,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; }