Centralize retained widget node destruction

This commit is contained in:
2026-06-12 16:44:33 +02:00
parent e89d882022
commit 7457b06cf9
4 changed files with 9 additions and 2 deletions

View File

@@ -584,6 +584,10 @@ agent or engineer to remove them without reconstructing context from chat.
import/discard prompts and brush-package export completion now route retained import/discard prompts and brush-package export completion now route retained
dialog closing through `src/legacy_ui_overlay_services.*` instead of direct dialog closing through `src/legacy_ui_overlay_services.*` instead of direct
`destroy()` calls from service adapters. `destroy()` calls from service adapters.
- 2026-06-12: DEBT-0063 was narrowed again. Flood-fill tool teardown and
checkbox icon removal now route retained node destruction through
`src/legacy_ui_overlay_services.*`. The underlying `Node` tree still exposes
raw child pointers and public destroy state.
- 2026-06-05: DEBT-0011 was narrowed. The Windows app package smoke target now - 2026-06-05: DEBT-0011 was narrowed. The Windows app package smoke target now
passes the configure-time CMake executable into `package-smoke.ps1`, so VS passes the configure-time CMake executable into `package-smoke.ps1`, so VS
2026 generator validation does not depend on an older `cmake` on PATH, and 2026 generator validation does not depend on an older `cmake` on PATH, and

View File

@@ -535,6 +535,8 @@ Button, slider, scroll, color-wheel, color-quad, and canvas gesture-end capture
release now route through that same helper. release now route through that same helper.
Legacy document-open import/discard prompts and brush-package export completion Legacy document-open import/discard prompts and brush-package export completion
now route retained dialog closing through the same helper. now route retained dialog closing through the same helper.
Flood-fill tool teardown and checkbox icon removal now route retained node
destruction through that helper as well.
Raw popup callback captures and full close/capture ownership remain part of Raw popup callback captures and full close/capture ownership remain part of
`DEBT-0063`. `DEBT-0063`.
`pano_cli inspect-image` exposes PNG IHDR metadata as JSON, `pano_cli inspect-image` exposes PNG IHDR metadata as JSON,

View File

@@ -1778,6 +1778,6 @@ void CanvasModeFloodFill::enter(kCanvasMode prev)
void CanvasModeFloodFill::leave(kCanvasMode next) void CanvasModeFloodFill::leave(kCanvasMode next)
{ {
m_tool->destroy(); pp::panopainter::destroy_legacy_node(*m_tool);
m_tool = nullptr; m_tool = nullptr;
} }

View File

@@ -1,5 +1,6 @@
#include "pch.h" #include "pch.h"
#include "log.h" #include "log.h"
#include "legacy_ui_overlay_services.h"
#include "node_checkbox.h" #include "node_checkbox.h"
#include "texture.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 (icon_path.empty() || !TextureManager::load(icon_path.c_str()))
{ {
if (m_icon) if (m_icon)
m_icon->destroy(); pp::panopainter::destroy_legacy_node(*m_icon);
m_icon = nullptr; m_icon = nullptr;
return; return;
} }