Centralize retained widget node destruction
This commit is contained in:
@@ -1778,6 +1778,6 @@ void CanvasModeFloodFill::enter(kCanvasMode prev)
|
||||
|
||||
void CanvasModeFloodFill::leave(kCanvasMode next)
|
||||
{
|
||||
m_tool->destroy();
|
||||
pp::panopainter::destroy_legacy_node(*m_tool);
|
||||
m_tool = nullptr;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "pch.h"
|
||||
#include "log.h"
|
||||
#include "legacy_ui_overlay_services.h"
|
||||
#include "node_checkbox.h"
|
||||
#include "texture.h"
|
||||
|
||||
@@ -103,7 +104,7 @@ void NodeCheckBox::set_icon(const std::string& icon_path)
|
||||
if (icon_path.empty() || !TextureManager::load(icon_path.c_str()))
|
||||
{
|
||||
if (m_icon)
|
||||
m_icon->destroy();
|
||||
pp::panopainter::destroy_legacy_node(*m_icon);
|
||||
m_icon = nullptr;
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user