From 98754d01c1c20b3f5400ca8c10a31d4028639ec1 Mon Sep 17 00:00:00 2001 From: omigamedev Date: Sat, 2 Mar 2019 14:59:00 +0100 Subject: [PATCH] fix tip change --- src/brush.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/brush.cpp b/src/brush.cpp index be31218..b3122ff 100644 --- a/src/brush.cpp +++ b/src/brush.cpp @@ -326,7 +326,7 @@ void Stroke::start(const std::shared_ptr& 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(); 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(); 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(); if (!m_pattern_texture->load(path))