fix tip change
This commit is contained in:
@@ -326,7 +326,7 @@ void Stroke::start(const std::shared_ptr<Brush>& brush)
|
||||
|
||||
bool Brush::load_tip(const std::string& path, const std::string& thumb)
|
||||
{
|
||||
if (m_tip_texture)
|
||||
if (m_tip_texture && m_brush_path == path)
|
||||
return true;
|
||||
m_tip_texture = std::make_shared<Texture2D>();
|
||||
if (!m_tip_texture->load(path))
|
||||
@@ -345,7 +345,7 @@ bool Brush::load_tip(const std::string& path, const std::string& thumb)
|
||||
|
||||
bool Brush::load_dual(const std::string& path, const std::string& thumb)
|
||||
{
|
||||
if (m_dual_texture)
|
||||
if (m_dual_texture && m_dual_path == path)
|
||||
return true;
|
||||
m_dual_texture = std::make_shared<Texture2D>();
|
||||
if (!m_dual_texture->load(path))
|
||||
@@ -362,7 +362,7 @@ bool Brush::load_dual(const std::string& path, const std::string& thumb)
|
||||
|
||||
bool Brush::load_pattern(const std::string& path, const std::string& thumb)
|
||||
{
|
||||
if (m_pattern_texture)
|
||||
if (m_pattern_texture && m_pattern_path == path)
|
||||
return true;
|
||||
m_pattern_texture = std::make_shared<Texture2D>();
|
||||
if (!m_pattern_texture->load(path))
|
||||
|
||||
Reference in New Issue
Block a user