diff --git a/contrib/src/stc/ScintillaWX.cpp b/contrib/src/stc/ScintillaWX.cpp index dc8265dcd9..a45afda5a1 100644 --- a/contrib/src/stc/ScintillaWX.cpp +++ b/contrib/src/stc/ScintillaWX.cpp @@ -139,7 +139,6 @@ END_EVENT_TABLE() ScintillaWX::ScintillaWX(wxStyledTextCtrl* win) { - capturedMouse = false; wMain = win; stc = win; wheelRotation = 0; @@ -221,16 +220,15 @@ void ScintillaWX::SetTicking(bool on) { void ScintillaWX::SetMouseCapture(bool on) { - if (on && !capturedMouse) + if (on && !stc->HasCapture()) stc->CaptureMouse(); - else if (!on && capturedMouse) + else if (!on && stc->HasCapture()) stc->ReleaseMouse(); - capturedMouse = on; } bool ScintillaWX::HaveMouseCapture() { - return capturedMouse; + return stc->HasCapture(); } diff --git a/contrib/src/stc/ScintillaWX.h b/contrib/src/stc/ScintillaWX.h index d904fc3c18..04b2ac0333 100644 --- a/contrib/src/stc/ScintillaWX.h +++ b/contrib/src/stc/ScintillaWX.h @@ -151,7 +151,6 @@ public: void DoScrollToColumn(int column); private: - bool capturedMouse; wxStyledTextCtrl* stc; #if wxUSE_DRAG_AND_DROP diff --git a/src/stc/ScintillaWX.cpp b/src/stc/ScintillaWX.cpp index dc8265dcd9..a45afda5a1 100644 --- a/src/stc/ScintillaWX.cpp +++ b/src/stc/ScintillaWX.cpp @@ -139,7 +139,6 @@ END_EVENT_TABLE() ScintillaWX::ScintillaWX(wxStyledTextCtrl* win) { - capturedMouse = false; wMain = win; stc = win; wheelRotation = 0; @@ -221,16 +220,15 @@ void ScintillaWX::SetTicking(bool on) { void ScintillaWX::SetMouseCapture(bool on) { - if (on && !capturedMouse) + if (on && !stc->HasCapture()) stc->CaptureMouse(); - else if (!on && capturedMouse) + else if (!on && stc->HasCapture()) stc->ReleaseMouse(); - capturedMouse = on; } bool ScintillaWX::HaveMouseCapture() { - return capturedMouse; + return stc->HasCapture(); } diff --git a/src/stc/ScintillaWX.h b/src/stc/ScintillaWX.h index d904fc3c18..04b2ac0333 100644 --- a/src/stc/ScintillaWX.h +++ b/src/stc/ScintillaWX.h @@ -151,7 +151,6 @@ public: void DoScrollToColumn(int column); private: - bool capturedMouse; wxStyledTextCtrl* stc; #if wxUSE_DRAG_AND_DROP