mirror of
https://git.mirrors.martin98.com/https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-14 13:45:59 +08:00
DoubleSlider: Fixed a bug related to the unexpected mouse capture end
Steps to repro: 1.Use left mouse button to move thumb of the DoubleSlider 2.Click by right mouse button 3.Thumb is moving even if you move the mouse out of the DoubleSlider
This commit is contained in:
parent
6af09cd3ea
commit
9f62aeabab
@ -1819,7 +1819,8 @@ void Control::OnChar(wxKeyEvent& event)
|
||||
|
||||
void Control::OnRightDown(wxMouseEvent& event)
|
||||
{
|
||||
if (HasCapture()) return;
|
||||
if (HasCapture() || m_is_left_down)
|
||||
return;
|
||||
this->CaptureMouse();
|
||||
|
||||
const wxPoint pos = event.GetLogicalPosition(wxClientDC(this));
|
||||
@ -2097,7 +2098,7 @@ void Control::auto_color_change()
|
||||
|
||||
void Control::OnRightUp(wxMouseEvent& event)
|
||||
{
|
||||
if (!HasCapture())
|
||||
if (!HasCapture() || m_is_left_down)
|
||||
return;
|
||||
this->ReleaseMouse();
|
||||
m_is_right_down = m_is_one_layer = false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user