Changes to ensure that the potential drag is totally cleaned up in LeftButtonUp
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39274 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -328,16 +328,17 @@ void ScintillaWX::SetTicking(bool on) {
|
|||||||
|
|
||||||
void ScintillaWX::SetMouseCapture(bool on) {
|
void ScintillaWX::SetMouseCapture(bool on) {
|
||||||
if (mouseDownCaptures) {
|
if (mouseDownCaptures) {
|
||||||
if (on && !capturedMouse)
|
if (on && !stc->HasCapture())
|
||||||
stc->CaptureMouse();
|
stc->CaptureMouse();
|
||||||
else if (!on && capturedMouse && stc->HasCapture())
|
else if (!on && stc->HasCapture())
|
||||||
stc->ReleaseMouse();
|
stc->ReleaseMouse();
|
||||||
capturedMouse = on;
|
capturedMouse = stc->HasCapture();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool ScintillaWX::HaveMouseCapture() {
|
bool ScintillaWX::HaveMouseCapture() {
|
||||||
|
capturedMouse = stc->HasCapture();
|
||||||
return capturedMouse;
|
return capturedMouse;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -827,13 +828,15 @@ void ScintillaWX::DoLeftButtonDown(Point pt, unsigned int curTime, bool shift, b
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ScintillaWX::DoLeftButtonUp(Point pt, unsigned int curTime, bool ctrl) {
|
void ScintillaWX::DoLeftButtonUp(Point pt, unsigned int curTime, bool ctrl) {
|
||||||
|
ButtonUp(pt, curTime, ctrl);
|
||||||
#if wxUSE_DRAG_AND_DROP
|
#if wxUSE_DRAG_AND_DROP
|
||||||
if (startDragTimer->IsRunning()) {
|
if (startDragTimer->IsRunning()) {
|
||||||
startDragTimer->Stop();
|
startDragTimer->Stop();
|
||||||
|
SetDragPosition(invalidPosition);
|
||||||
SetEmptySelection(PositionFromLocation(pt));
|
SetEmptySelection(PositionFromLocation(pt));
|
||||||
|
ShowCaretAtCurrentPosition();
|
||||||
}
|
}
|
||||||
#endif // wxUSE_DRAG_AND_DROP
|
#endif // wxUSE_DRAG_AND_DROP
|
||||||
ButtonUp(pt, curTime, ctrl);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScintillaWX::DoLeftButtonMove(Point pt) {
|
void ScintillaWX::DoLeftButtonMove(Point pt) {
|
||||||
|
@@ -328,16 +328,17 @@ void ScintillaWX::SetTicking(bool on) {
|
|||||||
|
|
||||||
void ScintillaWX::SetMouseCapture(bool on) {
|
void ScintillaWX::SetMouseCapture(bool on) {
|
||||||
if (mouseDownCaptures) {
|
if (mouseDownCaptures) {
|
||||||
if (on && !capturedMouse)
|
if (on && !stc->HasCapture())
|
||||||
stc->CaptureMouse();
|
stc->CaptureMouse();
|
||||||
else if (!on && capturedMouse && stc->HasCapture())
|
else if (!on && stc->HasCapture())
|
||||||
stc->ReleaseMouse();
|
stc->ReleaseMouse();
|
||||||
capturedMouse = on;
|
capturedMouse = stc->HasCapture();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool ScintillaWX::HaveMouseCapture() {
|
bool ScintillaWX::HaveMouseCapture() {
|
||||||
|
capturedMouse = stc->HasCapture();
|
||||||
return capturedMouse;
|
return capturedMouse;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -827,13 +828,15 @@ void ScintillaWX::DoLeftButtonDown(Point pt, unsigned int curTime, bool shift, b
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ScintillaWX::DoLeftButtonUp(Point pt, unsigned int curTime, bool ctrl) {
|
void ScintillaWX::DoLeftButtonUp(Point pt, unsigned int curTime, bool ctrl) {
|
||||||
|
ButtonUp(pt, curTime, ctrl);
|
||||||
#if wxUSE_DRAG_AND_DROP
|
#if wxUSE_DRAG_AND_DROP
|
||||||
if (startDragTimer->IsRunning()) {
|
if (startDragTimer->IsRunning()) {
|
||||||
startDragTimer->Stop();
|
startDragTimer->Stop();
|
||||||
|
SetDragPosition(invalidPosition);
|
||||||
SetEmptySelection(PositionFromLocation(pt));
|
SetEmptySelection(PositionFromLocation(pt));
|
||||||
|
ShowCaretAtCurrentPosition();
|
||||||
}
|
}
|
||||||
#endif // wxUSE_DRAG_AND_DROP
|
#endif // wxUSE_DRAG_AND_DROP
|
||||||
ButtonUp(pt, curTime, ctrl);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScintillaWX::DoLeftButtonMove(Point pt) {
|
void ScintillaWX::DoLeftButtonMove(Point pt) {
|
||||||
|
Reference in New Issue
Block a user