mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-06 14:37:36 -06:00
Disable right-click menu display in gizmo
This commit is contained in:
parent
6e9257c8ac
commit
e3b1e30387
2 changed files with 6 additions and 1 deletions
|
@ -4445,7 +4445,7 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt)
|
||||||
logical_pos = logical_pos.cwiseQuotient(Vec2d(factor, factor));
|
logical_pos = logical_pos.cwiseQuotient(Vec2d(factor, factor));
|
||||||
#endif // ENABLE_RETINA_GL
|
#endif // ENABLE_RETINA_GL
|
||||||
|
|
||||||
if (!m_mouse.ignore_right_up) {
|
if (!m_mouse.ignore_right_up && m_gizmos.get_current_type() == GLGizmosManager::EType::Undefined) {
|
||||||
//BBS post right click event
|
//BBS post right click event
|
||||||
if (!m_hover_plate_idxs.empty()) {
|
if (!m_hover_plate_idxs.empty()) {
|
||||||
post_event(RBtnPlateEvent(EVT_GLCANVAS_PLATE_RIGHT_CLICK, { logical_pos, m_hover_plate_idxs.front() }));
|
post_event(RBtnPlateEvent(EVT_GLCANVAS_PLATE_RIGHT_CLICK, { logical_pos, m_hover_plate_idxs.front() }));
|
||||||
|
|
|
@ -660,6 +660,11 @@ bool GLGizmosManager::on_mouse(const wxMouseEvent &mouse_event)
|
||||||
m_gizmos[m_current]->on_mouse(mouse_event))
|
m_gizmos[m_current]->on_mouse(mouse_event))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
if (mouse_event.RightUp() && m_current != EType::Undefined && !m_parent.is_mouse_dragging()) {
|
||||||
|
// Prevent default right context menu in gizmos
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue