Fixed the possibility of changing brush size in the multi-material gizmo by ALT+mouse wheel when brush for painting single triangles is selected.

This commit is contained in:
Lukáš Hejl 2021-08-06 15:26:26 +02:00
parent 17860fb38a
commit cf2a7f4dfa

View File

@ -283,7 +283,7 @@ bool GLGizmoPainterBase::gizmo_event(SLAGizmoEventType action, const Vec2d& mous
return true;
}
else if (alt_down) {
if (m_tool_type == ToolType::BRUSH) {
if (m_tool_type == ToolType::BRUSH && (m_cursor_type == TriangleSelector::CursorType::SPHERE || m_cursor_type == TriangleSelector::CursorType::CIRCLE)) {
m_cursor_radius = action == SLAGizmoEventType::MouseWheelDown ? std::max(m_cursor_radius - CursorRadiusStep, CursorRadiusMin)
: std::min(m_cursor_radius + CursorRadiusStep, CursorRadiusMax);
m_parent.set_as_dirty();