implement brush presets save and restore from file, fix stencil nullptr, limit preview stroke max size

This commit is contained in:
2019-01-23 16:53:58 +01:00
parent e26fcf1163
commit 879be9d4fe
17 changed files with 282 additions and 65 deletions

View File

@@ -177,7 +177,7 @@ void CanvasModePen::on_MouseEvent(MouseEvent* me, glm::vec2& loc)
if (m_dragging && m_resizing)
{
auto diff = m_cur_pos - m_size_pos_start;
canvas->m_current_brush->m_tip_size = m_size_value_start + diff.x * 0.001f;
canvas->m_current_brush->m_tip_size = glm::max(m_size_value_start + diff.x * 0.001f, 0.001f);
}
m_cur_pos = loc;
break;