Fixed possibility of releasing mouse if the window no longer had it captured
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18304 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -139,7 +139,6 @@ END_EVENT_TABLE()
|
|||||||
|
|
||||||
|
|
||||||
ScintillaWX::ScintillaWX(wxStyledTextCtrl* win) {
|
ScintillaWX::ScintillaWX(wxStyledTextCtrl* win) {
|
||||||
capturedMouse = false;
|
|
||||||
wMain = win;
|
wMain = win;
|
||||||
stc = win;
|
stc = win;
|
||||||
wheelRotation = 0;
|
wheelRotation = 0;
|
||||||
@@ -221,16 +220,15 @@ void ScintillaWX::SetTicking(bool on) {
|
|||||||
|
|
||||||
|
|
||||||
void ScintillaWX::SetMouseCapture(bool on) {
|
void ScintillaWX::SetMouseCapture(bool on) {
|
||||||
if (on && !capturedMouse)
|
if (on && !stc->HasCapture())
|
||||||
stc->CaptureMouse();
|
stc->CaptureMouse();
|
||||||
else if (!on && capturedMouse)
|
else if (!on && stc->HasCapture())
|
||||||
stc->ReleaseMouse();
|
stc->ReleaseMouse();
|
||||||
capturedMouse = on;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool ScintillaWX::HaveMouseCapture() {
|
bool ScintillaWX::HaveMouseCapture() {
|
||||||
return capturedMouse;
|
return stc->HasCapture();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -151,7 +151,6 @@ public:
|
|||||||
void DoScrollToColumn(int column);
|
void DoScrollToColumn(int column);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool capturedMouse;
|
|
||||||
wxStyledTextCtrl* stc;
|
wxStyledTextCtrl* stc;
|
||||||
|
|
||||||
#if wxUSE_DRAG_AND_DROP
|
#if wxUSE_DRAG_AND_DROP
|
||||||
|
@@ -139,7 +139,6 @@ END_EVENT_TABLE()
|
|||||||
|
|
||||||
|
|
||||||
ScintillaWX::ScintillaWX(wxStyledTextCtrl* win) {
|
ScintillaWX::ScintillaWX(wxStyledTextCtrl* win) {
|
||||||
capturedMouse = false;
|
|
||||||
wMain = win;
|
wMain = win;
|
||||||
stc = win;
|
stc = win;
|
||||||
wheelRotation = 0;
|
wheelRotation = 0;
|
||||||
@@ -221,16 +220,15 @@ void ScintillaWX::SetTicking(bool on) {
|
|||||||
|
|
||||||
|
|
||||||
void ScintillaWX::SetMouseCapture(bool on) {
|
void ScintillaWX::SetMouseCapture(bool on) {
|
||||||
if (on && !capturedMouse)
|
if (on && !stc->HasCapture())
|
||||||
stc->CaptureMouse();
|
stc->CaptureMouse();
|
||||||
else if (!on && capturedMouse)
|
else if (!on && stc->HasCapture())
|
||||||
stc->ReleaseMouse();
|
stc->ReleaseMouse();
|
||||||
capturedMouse = on;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool ScintillaWX::HaveMouseCapture() {
|
bool ScintillaWX::HaveMouseCapture() {
|
||||||
return capturedMouse;
|
return stc->HasCapture();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -151,7 +151,6 @@ public:
|
|||||||
void DoScrollToColumn(int column);
|
void DoScrollToColumn(int column);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool capturedMouse;
|
|
||||||
wxStyledTextCtrl* stc;
|
wxStyledTextCtrl* stc;
|
||||||
|
|
||||||
#if wxUSE_DRAG_AND_DROP
|
#if wxUSE_DRAG_AND_DROP
|
||||||
|
Reference in New Issue
Block a user