void ScintillaWX::Initialise() {
//ScintillaBase::Initialise();
- dropTarget.SetScintilla(this);
- stc->SetDropTarget(&dropTarget);
+ dropTarget = new wxSTCDropTarget;
+ dropTarget->SetScintilla(this);
+ stc->SetDropTarget(dropTarget);
}
void ScintillaWX::StartDrag() {
- wxDropSource source;
+ wxDropSource source(wMain.GetID());
wxTextDataObject data(dragChars);
wxDragResult result;
void ScintillaWX::SetMouseCapture(bool on) {
- if (on)
+ if (on && !capturedMouse)
wMain.GetID()->CaptureMouse();
- else
+ else if (!on && capturedMouse)
wMain.GetID()->ReleaseMouse();
capturedMouse = on;
}