Allow right click on empty space while an object selected (#9335)

Update GLCanvas3D.cpp
This commit is contained in:
yw4z 2025-04-14 05:13:39 +03:00 committed by GitHub
parent 8dd9e64af8
commit 5b3109945e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -4493,6 +4493,12 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt)
render(); render();
} }
//ORCA allow right click on empty space while an object selected
if (m_hover_plate_idxs.empty() && m_hover_volume_idxs.empty() && (m_canvas_type == CanvasView3D) && !m_mouse.dragging) {
deselect_all();
render();
}
Vec2d logical_pos = pos.cast<double>(); Vec2d logical_pos = pos.cast<double>();
#if ENABLE_RETINA_GL #if ENABLE_RETINA_GL
const float factor = m_retina_helper->get_scale_factor(); const float factor = m_retina_helper->get_scale_factor();