ENH: refine gizmo paint tools

1. support to adjust cursor size and section view by key + mouse wheel
2. display shortcut tips according to the selected tool type
3. change the left mouse behavior to object movement for color painting tool

Signed-off-by: yifan.wu <yifan.wu@bambulab.com>
Change-Id: I13d2a83d562d6ccd8d915158e263a90ad3c02db0
This commit is contained in:
yifan.wu 2022-10-16 17:30:22 +08:00 committed by Lane.Wei
parent d38c5b07fa
commit f3c65f8597
8 changed files with 129 additions and 50 deletions

View file

@ -679,7 +679,14 @@ bool GLGizmosManager::on_mouse_wheel(wxMouseEvent& evt)
if (m_current == SlaSupports || m_current == Hollow || m_current == FdmSupports || m_current == Seam || m_current == MmuSegmentation) {
float rot = (float)evt.GetWheelRotation() / (float)evt.GetWheelDelta();
if (gizmo_event((rot > 0.f ? SLAGizmoEventType::MouseWheelUp : SLAGizmoEventType::MouseWheelDown), Vec2d::Zero(), evt.ShiftDown(), evt.AltDown(), evt.ControlDown()))
if (gizmo_event((rot > 0.f ? SLAGizmoEventType::MouseWheelUp : SLAGizmoEventType::MouseWheelDown), Vec2d::Zero(), evt.ShiftDown(), evt.AltDown()
// BBS
#ifdef __WXOSX_MAC__
, evt.RawControlDown()
#else
, evt.ControlDown()
#endif
))
processed = true;
}
@ -705,7 +712,8 @@ bool GLGizmosManager::on_mouse(wxMouseEvent& evt)
if (evt.Moving()) {
m_tooltip = update_hover_state(mouse_pos);
if (m_current == MmuSegmentation || m_current == FdmSupports)
gizmo_event(SLAGizmoEventType::Moving, mouse_pos, evt.ShiftDown(), evt.AltDown());
// BBS
gizmo_event(SLAGizmoEventType::Moving, mouse_pos, evt.ShiftDown(), evt.AltDown(), evt.ControlDown());
} else if (evt.LeftUp()) {
if (m_mouse_capture.left) {
processed = true;