Mouse capture when dragging gizmos
This commit is contained in:
parent
cda135ada7
commit
220d430956
@ -3111,6 +3111,8 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt)
|
|||||||
}
|
}
|
||||||
else if (evt.Dragging() && m_gizmos.is_dragging())
|
else if (evt.Dragging() && m_gizmos.is_dragging())
|
||||||
{
|
{
|
||||||
|
m_canvas->CaptureMouse();
|
||||||
|
|
||||||
m_mouse.dragging = true;
|
m_mouse.dragging = true;
|
||||||
m_gizmos.update(mouse_ray(pos));
|
m_gizmos.update(mouse_ray(pos));
|
||||||
|
|
||||||
@ -3286,6 +3288,9 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt)
|
|||||||
m_mouse.dragging = false;
|
m_mouse.dragging = false;
|
||||||
m_toolbar_action_running = false;
|
m_toolbar_action_running = false;
|
||||||
m_dirty = true;
|
m_dirty = true;
|
||||||
|
|
||||||
|
if (m_canvas->HasCapture())
|
||||||
|
m_canvas->ReleaseMouse();
|
||||||
}
|
}
|
||||||
else if (evt.Moving())
|
else if (evt.Moving())
|
||||||
{
|
{
|
||||||
|
@ -197,6 +197,8 @@ void GLGizmoBase::start_dragging()
|
|||||||
|
|
||||||
void GLGizmoBase::stop_dragging()
|
void GLGizmoBase::stop_dragging()
|
||||||
{
|
{
|
||||||
|
set_tooltip("");
|
||||||
|
|
||||||
for (int i = 0; i < (int)m_grabbers.size(); ++i)
|
for (int i = 0; i < (int)m_grabbers.size(); ++i)
|
||||||
{
|
{
|
||||||
m_grabbers[i].dragging = false;
|
m_grabbers[i].dragging = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user