fix presets save and restore
This commit is contained in:
@@ -236,7 +236,7 @@ std::vector<StrokeSample> Stroke::compute_samples()
|
||||
}
|
||||
else if (m_brush->m_tip_angle_init)
|
||||
{
|
||||
s.angle = m_dir_init;
|
||||
s.angle += m_dir_init;
|
||||
}
|
||||
|
||||
m_prev_sample = s;
|
||||
@@ -351,7 +351,10 @@ bool Brush::load_tip(const std::string& path, const std::string& thumb)
|
||||
{
|
||||
m_tip_texture = std::make_shared<Texture2D>();
|
||||
if (!m_tip_texture->load(path))
|
||||
{
|
||||
m_tip_texture = nullptr;
|
||||
return false;
|
||||
}
|
||||
m_tip_texture->create_mipmaps();
|
||||
m_tip_texture->auto_destroy = true;
|
||||
m_brush_path = path;
|
||||
@@ -365,7 +368,10 @@ bool Brush::load_dual(const std::string& path, const std::string& thumb)
|
||||
{
|
||||
m_dual_texture = std::make_shared<Texture2D>();
|
||||
if (!m_dual_texture->load(path))
|
||||
{
|
||||
m_dual_texture = nullptr;
|
||||
return false;
|
||||
}
|
||||
m_dual_texture->create_mipmaps();
|
||||
m_dual_texture->auto_destroy = true;
|
||||
m_dual_path = path;
|
||||
@@ -377,7 +383,10 @@ bool Brush::load_pattern(const std::string& path, const std::string& thumb)
|
||||
{
|
||||
m_pattern_texture = std::make_shared<Texture2D>();
|
||||
if (!m_pattern_texture->load(path))
|
||||
{
|
||||
m_pattern_texture = nullptr;
|
||||
return false;
|
||||
}
|
||||
m_pattern_texture->create_mipmaps();
|
||||
m_pattern_texture->auto_destroy = true;
|
||||
m_pattern_path = path;
|
||||
|
||||
Reference in New Issue
Block a user