Centralize layout unload destruction

This commit is contained in:
2026-06-12 16:49:17 +02:00
parent 7457b06cf9
commit b9b0663546
4 changed files with 10 additions and 2 deletions

View File

@@ -588,6 +588,11 @@ agent or engineer to remove them without reconstructing context from chat.
checkbox icon removal now route retained node destruction through checkbox icon removal now route retained node destruction through
`src/legacy_ui_overlay_services.*`. The underlying `Node` tree still exposes `src/legacy_ui_overlay_services.*`. The underlying `Node` tree still exposes
raw child pointers and public destroy state. raw child pointers and public destroy state.
- 2026-06-12: DEBT-0063 was narrowed again. Layout unload root destruction and
popup tick-overlay close callbacks now route retained node destruction through
`src/legacy_ui_overlay_services.*`. `Node::destroy()` itself remains the
compatibility boundary until checked tree handles replace raw parent/child
mutation.
- 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

@@ -537,6 +537,8 @@ 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 Flood-fill tool teardown and checkbox icon removal now route retained node
destruction through that helper as well. destruction through that helper as well.
Layout unload root destruction and popup tick-overlay close callbacks now route
retained node destruction through that helper.
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

@@ -4,13 +4,14 @@
#include "asset.h" #include "asset.h"
#include "node.h" #include "node.h"
#include "node_border.h" #include "node_border.h"
#include "legacy_ui_overlay_services.h"
#include "layout.h" #include "layout.h"
#include "platform_api/asset_file_load_policy.h" #include "platform_api/asset_file_load_policy.h"
void LayoutManager::unload() void LayoutManager::unload()
{ {
for (auto& l : m_layouts) for (auto& l : m_layouts)
l.second->destroy(); pp::panopainter::destroy_legacy_node(*l.second);
m_layouts.clear(); m_layouts.clear();
} }

View File

@@ -74,7 +74,7 @@ void bind_legacy_popup_close_destroys_overlay(
{ {
popup.on_popup_close = [overlay](Node*) { popup.on_popup_close = [overlay](Node*) {
if (overlay) { if (overlay) {
overlay->destroy(); destroy_legacy_node(*overlay);
} }
}; };
} }