compute tip scale when loading from brush tips, remove tip_width which was replaced by tip_scale

This commit is contained in:
2019-02-26 17:44:36 +01:00
parent c66edd9b98
commit d7ac967f12
4 changed files with 2 additions and 4 deletions

View File

@@ -339,6 +339,8 @@ bool Brush::load_tip(const std::string& path, const std::string& thumb)
m_tip_texture->auto_destroy = true;
m_brush_path = path;
m_brush_thumb_path = thumb;
auto sz = m_tip_texture->size();
m_tip_scale = sz.y > sz.x ? glm::vec2(sz.x / sz.y, 1.f) : glm::vec2(1.f, sz.y / sz.x);
return true;
}