unload brush texture from main memory, preload brush on preview to free render thread

This commit is contained in:
2019-03-01 23:28:30 +01:00
parent 0be47c7fb6
commit 1edbc27ae6
5 changed files with 84 additions and 13 deletions

View File

@@ -662,13 +662,8 @@ bool NodePanelBrushPreset::restore()
fread((char*)b->m_pattern_path.c_str(), 1, b->m_pattern_path.size(), fp);
fread((char*)b->m_pattern_thumb_path.c_str(), 1, b->m_pattern_thumb_path.size(), fp);
if (b->load_tip(b->m_brush_path, b->m_brush_thumb_path))
if (b->valid())
{
if (!b->m_pattern_path.empty())
b->load_pattern(b->m_pattern_path, b->m_pattern_thumb_path);
if (!b->m_dual_path.empty())
b->load_dual(b->m_dual_path, b->m_dual_thumb_path);
NodeBrushPresetItem* brush = new NodeBrushPresetItem;
m_container->add_child(brush);
brush->init();