Centralize retained popup closing

This commit is contained in:
2026-06-12 15:00:55 +02:00
parent 76c0ed3c10
commit 4c7c48a22c
7 changed files with 71 additions and 98 deletions

View File

@@ -498,6 +498,11 @@ agent or engineer to remove them without reconstructing context from chat.
for top-toolbar, quick-panel, stroke-panel, and combo-box popups now route
through `src/legacy_ui_overlay_services.*`. Raw popup callback captures,
retained close semantics, and broader `Node` handle adoption remain open.
- 2026-06-12: DEBT-0063 was narrowed again. Retained menu, submenu, combo-box,
and brush-preset popup close/release execution now routes through
`src/legacy_ui_overlay_services.*` instead of open-coded `mouse_release()` and
`destroy()` pairs. Raw callback captures, retained popup close policy, and
broader `Node` handle adoption remain open.
- 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
2026 generator validation does not depend on an older `cmake` on PATH, and
@@ -764,7 +769,7 @@ agent or engineer to remove them without reconstructing context from chat.
| DEBT-0060 | Open | Modernization | Retained Android package CMake generates a patched `nanort.h` overlay in the build tree for `native-lib` instead of modifying the `libs/nanort` submodule | Current SDK Manager NDK/Clang rejects `TriangleSAHPred::operator=` assigning to a `const size_t` member, but the retained grid/lightmap path still includes `nanort` before that dependency is replaced or updated | `powershell -ExecutionPolicy Bypass -File scripts\automation\android-legacy-package-build.ps1 -Packages standard`; Quest/Focus retained package configure checks; Windows app build | Update/replace `nanort`, move grid/lightmap baking behind a component that owns its dependency, or retire the retained Android package CMake path so no generated vendor overlay is required |
| DEBT-0061 | Open | Modernization | Desktop XR runtime selection now lives in tested `pp_platform_api` policy and prefers OpenXR, but `WindowsPlatformServices` still reports OpenXR unavailable and reaches the retained OpenVR SDK bridge as a legacy fallback; Windows runtime deployment copies `openvr_api.dll` beside `PanoPainter.exe` until that fallback is removed | Preserve current desktop VR behavior while replacing OpenVR with OpenXR behind the platform/renderer boundary | `pp_platform_api_tests`; `ctest --preset desktop-fast --build-config Debug -R pp_platform_api_tests --output-on-failure`; `cmake --build --preset windows-msvc-default --config Debug --target PanoPainter` | Add an OpenXR SDK/package target, implement desktop OpenXR startup/shutdown/pose/controller submission behind `pp_platform_vr` or `PlatformServices`, validate parity with mocked/runtime smoke coverage, and remove `libs/openvr` plus the OpenVR link/include paths from root CMake |
| DEBT-0062 | Open | Modernization | VS 2026 builds generate a patched fmt `format.h` overlay in the build tree for `pp_legacy_vendor`, disabling the old `_SECURE_SCL` checked-array iterator branch while leaving the fmt submodule clean | VS 2026's STL no longer exposes the legacy checked-array iterator used by this old fmt release, but replacing fmt is part of the dependency migration rather than this platform unblock | `cmake --build --preset windows-msvc-default --config Debug --target PanoPainter`; `cmake --build --preset windows-msvc-default --config Debug --target pp_platform_api_tests`; `ctest --preset desktop-fast --build-config Debug -R pp_platform_api_tests --output-on-failure` | Move fmt to a supported vcpkg/package version or update the vendored fmt release, then remove the generated fmt overlay from `pp_legacy_vendor` |
| DEBT-0063 | Open | Modernization | The retained UI tree still exposes `Node* m_parent`, public `std::vector<std::shared_ptr<Node>> m_children`, raw `find<T>()` lookup results, `add_child<T>()` allocation through `new`, callbacks/observers that take or capture raw `Node*`, and manual `destroy()`/`m_destroyed` semantics. `pp_ui_core` now owns a tested `NodeLifetimeTree` target model with checked node handles, scoped callback connections, subtree destruction, pointer/keyboard capture release, whole-tree clear for layout reload, and mutation-safe dispatch, plus a tested `UiOverlayLifetime` popup/dialog stack model. Retained app-dialog root insertion, app-menu popup template cloning/root attachment, quick/stroke/brush panel popup root attachment, combo-box popup insertion, Open/Browse delete-confirmation dialog insertion, popup tick decoration insertion, top-toolbar panel popup insertion, and repeated retained popup activation flag setup are now centralized in `src/legacy_ui_overlay_services.*`, but retained `Node`/`NodePopupMenu`/`NodeDialog*` still have not adopted checked handles or scoped callback ownership | Preserve current UI behavior while making panel/dialog extraction safe instead of spreading lifetime hazards into the new architecture | `pp_ui_core_layout_xml_tests`; `pp_ui_core_node_lifetime_tests`; `pp_ui_core_overlay_lifetime_tests`; future `pp_panopainter_ui_dialog_lifetime_tests`; `ctest --preset desktop-fast --build-config Debug`; `cmake --build --preset windows-msvc-default --config Debug --target PanoPainter` | Retained `Node` and `pp_panopainter_ui` adopt checked node handles or equivalent non-owning references, scoped callback connection/disconnect semantics, mutation-safe event dispatch, parent/child invariants hidden behind APIs, and destroy-during-callback/capture-release/popup-close/layout-reload tests; retained `Node*` APIs are removed or isolated behind compatibility adapters |
| DEBT-0063 | Open | Modernization | The retained UI tree still exposes `Node* m_parent`, public `std::vector<std::shared_ptr<Node>> m_children`, raw `find<T>()` lookup results, `add_child<T>()` allocation through `new`, callbacks/observers that take or capture raw `Node*`, and manual `destroy()`/`m_destroyed` semantics. `pp_ui_core` now owns a tested `NodeLifetimeTree` target model with checked node handles, scoped callback connections, subtree destruction, pointer/keyboard capture release, whole-tree clear for layout reload, and mutation-safe dispatch, plus a tested `UiOverlayLifetime` popup/dialog stack model. Retained app-dialog root insertion, app-menu popup template cloning/root attachment, quick/stroke/brush panel popup root attachment, combo-box popup insertion, Open/Browse delete-confirmation dialog insertion, popup tick decoration insertion, top-toolbar panel popup insertion, repeated retained popup activation flag setup, and repeated retained popup close/release execution are now centralized in `src/legacy_ui_overlay_services.*`, but retained `Node`/`NodePopupMenu`/`NodeDialog*` still have not adopted checked handles or scoped callback ownership | Preserve current UI behavior while making panel/dialog extraction safe instead of spreading lifetime hazards into the new architecture | `pp_ui_core_layout_xml_tests`; `pp_ui_core_node_lifetime_tests`; `pp_ui_core_overlay_lifetime_tests`; future `pp_panopainter_ui_dialog_lifetime_tests`; `ctest --preset desktop-fast --build-config Debug`; `cmake --build --preset windows-msvc-default --config Debug --target PanoPainter` | Retained `Node` and `pp_panopainter_ui` adopt checked node handles or equivalent non-owning references, scoped callback connection/disconnect semantics, mutation-safe event dispatch, parent/child invariants hidden behind APIs, and destroy-during-callback/capture-release/popup-close/layout-reload tests; retained `Node*` APIs are removed or isolated behind compatibility adapters |
| DEBT-0057 | Open | Modernization | Default canvas allocation size now dispatches through `PlatformServices::default_canvas_resolution`, removing the `CANVAS_RES` platform macro from `src/canvas.h`; WebGL's retained 512 default now lives in tested `pp_platform_api::platform_policy`, but the Web shell still reaches it through the legacy platform fallback until injected Web services own the policy | Preserve WebGL memory behavior while moving canvas creation policy out of shared canvas headers and into the platform boundary | `pp_platform_api_tests`; `ctest --preset desktop-fast --build-config Debug -R pp_platform_api_tests`; Windows app build; WebGL package smoke once root Web build exists | Default canvas resolution is owned by injected `pp_platform_*` services for every supported platform, with no WebGL branch in the legacy fallback |
| DEBT-0058 | Open | Modernization | App-level progress/message/input dialog metadata, including message-dialog OK/cancel captions, now consumes pure `pp_app_core` through `App::show_progress`, `App::message_box`, `App::input_box`, `pano_cli plan-app-dialog`, and `pp_app_core_app_dialog_tests`; live execution is centralized in `src/legacy_app_dialog_services.*`, and retained root insertion now routes through `src/legacy_ui_overlay_services.*`, but the bridge still creates retained `NodeProgressBar`, `NodeMessageBox`, and `NodeInputBox` instances with raw callback/lifetime ownership | Preserve current app-shell dialog behavior while moving shared dialog policy toward UI/app services | `pp_app_core_app_dialog_tests`; `pano_cli plan-app-dialog --kind progress --total -4`; `pano_cli plan-app-dialog --kind message --cancel`; `pano_cli plan-app-dialog --kind input --ok-caption Save`; `ctest --preset desktop-fast --build-config Debug`; Windows app build | Progress/message/input dialog creation, callback wiring, layout insertion, lifetime ownership, and headless automation are owned by injected app/UI services with `App` methods acting only as adapters |
| DEBT-0059 | Open | Modernization | iOS root CMake headless builds assign generated bundle identifiers and disable code signing for executable test/tool targets | The current Apple gate is compile validation for shared component targets; signed iOS app/package validation is not migrated to root CMake yet | `powershell -ExecutionPolicy Bypass -File scripts\automation\apple-remote-build.ps1 -Presets macos,ios-simulator,ios-device`; `sh scripts/automation/platform-build.sh "ios-device"` on `panopainter-mac` | Root CMake owns the signed Apple app/package targets, package-smoke validates Apple bundles where signing material is available, and headless iOS test/tool targets are either excluded from signed package builds or use explicit test-runner signing policy |

View File

@@ -490,8 +490,9 @@ brush-panel preset menu root insertion, retained combo-box popups,
Open/Browse delete-confirmation dialogs, popup tick decoration nodes, and
top-toolbar panel popups route through it. The helper also centralizes retained
popup mouse-ignore/flood/capture-child activation for those popup families.
Raw popup callback captures and full close/capture ownership remain part of
`DEBT-0063`.
Repeated menu, submenu, combo-box, and brush-preset popup close/release
execution now uses the same retained helper. Raw popup callback captures and
full close/capture ownership remain part of `DEBT-0063`.
`pano_cli inspect-image` exposes PNG IHDR metadata as JSON,
`pano_cli import-image` accepts a PNG path and imports decoded RGBA8 pixels
into a new pure `pp_document` face payload,

View File

@@ -678,50 +678,42 @@ void App::init_menu_file()
if (auto b = popup->find<NodeButtonCustom>("file-newdoc"))
b->on_click = [this, popup](Node*) {
apply_file_menu_plan(*this, pp::app::FileMenuCommand::new_document);
popup->mouse_release();
popup->destroy();
pp::panopainter::close_legacy_popup_overlay(*popup);
};
if (auto b = popup->find<NodeButtonCustom>("file-import"))
b->on_click = [this, popup](Node*) {
apply_file_menu_plan(*this, pp::app::FileMenuCommand::import_image);
popup->mouse_release();
popup->destroy();
pp::panopainter::close_legacy_popup_overlay(*popup);
};
if (auto b = popup->find<NodeButtonCustom>("file-open"))
b->on_click = [this, popup](Node*) {
apply_file_menu_plan(*this, pp::app::FileMenuCommand::open_project);
popup->mouse_release();
popup->destroy();
pp::panopainter::close_legacy_popup_overlay(*popup);
};
if (auto b = popup->find<NodeButtonCustom>("file-browse"))
b->on_click = [this, popup](Node*) {
apply_file_menu_plan(*this, pp::app::FileMenuCommand::browse_cloud);
popup->mouse_release();
popup->destroy();
pp::panopainter::close_legacy_popup_overlay(*popup);
};
if (auto b = popup->find<NodeButtonCustom>("file-save"))
b->on_click = [this, popup](Node*) {
apply_file_menu_plan(*this, pp::app::FileMenuCommand::save);
popup->mouse_release();
popup->destroy();
pp::panopainter::close_legacy_popup_overlay(*popup);
};
if (auto b = popup->find<NodeButtonCustom>("file-save-as"))
b->on_click = [this, popup](Node*) {
apply_file_menu_plan(*this, pp::app::FileMenuCommand::save_as);
popup->mouse_release();
popup->destroy();
pp::panopainter::close_legacy_popup_overlay(*popup);
};
if (auto b = popup->find<NodeButtonCustom>("file-save-ver"))
b->on_click = [this, popup](Node*) {
apply_file_menu_plan(*this, pp::app::FileMenuCommand::save_version);
popup->mouse_release();
popup->destroy();
pp::panopainter::close_legacy_popup_overlay(*popup);
};
if (auto b = popup->find<NodeButtonCustom>("file-export"))
b->on_click = [this, popup](Node*) {
apply_file_menu_plan(*this, pp::app::FileMenuCommand::export_jpeg);
popup->mouse_release();
popup->destroy();
pp::panopainter::close_legacy_popup_overlay(*popup);
};
if (auto b = popup->find<NodeButtonCustom>("file-export-tick"))
b->on_click = [this, b, popup](Node*) {
@@ -731,77 +723,59 @@ void App::init_menu_file()
return;
subpopup->find<NodeButtonCustom>("file-submenu-export-png")->on_click = [this, subpopup, popup](Node*) {
apply_document_export_menu_plan(*this, pp::app::DocumentExportMenuKind::png);
popup->mouse_release();
popup->destroy();
subpopup->mouse_release();
subpopup->destroy();
pp::panopainter::close_legacy_popup_overlay(*popup);
pp::panopainter::close_legacy_popup_overlay(*subpopup);
};
subpopup->find<NodeButtonCustom>("file-submenu-export-layers")->on_click = [this, subpopup, popup](Node*) {
apply_document_export_menu_plan(*this, pp::app::DocumentExportMenuKind::layers);
popup->mouse_release();
popup->destroy();
subpopup->mouse_release();
subpopup->destroy();
pp::panopainter::close_legacy_popup_overlay(*popup);
pp::panopainter::close_legacy_popup_overlay(*subpopup);
};
subpopup->find<NodeButtonCustom>("file-submenu-export-cube")->on_click = [this, subpopup, popup](Node*) {
apply_document_export_menu_plan(*this, pp::app::DocumentExportMenuKind::cube_faces);
popup->mouse_release();
popup->destroy();
subpopup->mouse_release();
subpopup->destroy();
pp::panopainter::close_legacy_popup_overlay(*popup);
pp::panopainter::close_legacy_popup_overlay(*subpopup);
};
subpopup->find<NodeButtonCustom>("file-submenu-export-depth")->on_click = [this, subpopup, popup](Node*) {
apply_document_export_menu_plan(*this, pp::app::DocumentExportMenuKind::depth);
popup->mouse_release();
popup->destroy();
subpopup->mouse_release();
subpopup->destroy();
pp::panopainter::close_legacy_popup_overlay(*popup);
pp::panopainter::close_legacy_popup_overlay(*subpopup);
};
subpopup->find<NodeButtonCustom>("file-submenu-export-anim")->on_click = [this, subpopup, popup](Node*) {
apply_document_export_menu_plan(*this, pp::app::DocumentExportMenuKind::animation_frames);
popup->mouse_release();
popup->destroy();
subpopup->mouse_release();
subpopup->destroy();
pp::panopainter::close_legacy_popup_overlay(*popup);
pp::panopainter::close_legacy_popup_overlay(*subpopup);
};
subpopup->find<NodeButtonCustom>("file-submenu-export-anim-mp4")->on_click = [this, subpopup, popup](Node*) {
apply_document_export_menu_plan(*this, pp::app::DocumentExportMenuKind::animation_mp4);
popup->mouse_release();
popup->destroy();
subpopup->mouse_release();
subpopup->destroy();
pp::panopainter::close_legacy_popup_overlay(*popup);
pp::panopainter::close_legacy_popup_overlay(*subpopup);
};
subpopup->find<NodeButtonCustom>("file-submenu-export-timelapse")->on_click = [this, subpopup, popup](Node*) {
apply_document_export_menu_plan(*this, pp::app::DocumentExportMenuKind::timelapse);
popup->mouse_release();
popup->destroy();
subpopup->mouse_release();
subpopup->destroy();
pp::panopainter::close_legacy_popup_overlay(*popup);
pp::panopainter::close_legacy_popup_overlay(*subpopup);
};
};
if (auto b = popup->find<NodeButtonCustom>("file-share"))
b->on_click = [this, popup](Node*) {
apply_file_menu_plan(*this, pp::app::FileMenuCommand::share);
popup->mouse_release();
popup->destroy();
pp::panopainter::close_legacy_popup_overlay(*popup);
};
if (auto b = popup->find<NodeButtonCustom>("file-resize"))
b->on_click = [this, popup](Node*) {
apply_file_menu_plan(*this, pp::app::FileMenuCommand::resize);
popup->mouse_release();
popup->destroy();
pp::panopainter::close_legacy_popup_overlay(*popup);
};
if (auto b = popup->find<NodeButtonCustom>("file-cloud-upload"))
b->on_click = [this, popup](Node*) {
apply_file_menu_plan(*this, pp::app::FileMenuCommand::cloud_upload);
popup->mouse_release();
popup->destroy();
pp::panopainter::close_legacy_popup_overlay(*popup);
};
if (auto b = popup->find<NodeButtonCustom>("file-cloud-browse"))
b->on_click = [this, popup](Node*) {
apply_file_menu_plan(*this, pp::app::FileMenuCommand::cloud_browse);
popup->mouse_release();
popup->destroy();
pp::panopainter::close_legacy_popup_overlay(*popup);
};
};
}
@@ -880,8 +854,8 @@ void App::init_menu_tools()
{
fpanel->m_container->add_child(floating_presets);
}
popup_exp->destroy();
popup_time->destroy();
pp::panopainter::close_legacy_popup_overlay(*popup_exp);
pp::panopainter::close_legacy_popup_overlay(*popup_time);
};
popup_time->find<NodeButtonCustom>("panel-color")->on_click = [this, popup_time, popup_exp, visible](Node*) {
@@ -908,8 +882,8 @@ void App::init_menu_tools()
{
fpanel->m_container->add_child(floating_color);
}
popup_exp->destroy();
popup_time->destroy();
pp::panopainter::close_legacy_popup_overlay(*popup_exp);
pp::panopainter::close_legacy_popup_overlay(*popup_time);
};
popup_time->find<NodeButtonCustom>("panel-color-adv")->on_click = [this, popup_time, popup_exp, visible](Node*) {
const auto plan = pp::app::plan_tools_panel(
@@ -935,8 +909,8 @@ void App::init_menu_tools()
{
fpanel->m_container->add_child(floating_picker);
}
popup_exp->destroy();
popup_time->destroy();
pp::panopainter::close_legacy_popup_overlay(*popup_exp);
pp::panopainter::close_legacy_popup_overlay(*popup_time);
};
popup_time->find<NodeButtonCustom>("panel-layers")->on_click = [this, popup_time, popup_exp, visible](Node*) {
const auto plan = pp::app::plan_tools_panel(
@@ -956,8 +930,8 @@ void App::init_menu_tools()
if (plan.hides_embedded_title)
layers->find("title")->SetVisibility(false);
popup_exp->destroy();
popup_time->destroy();
pp::panopainter::close_legacy_popup_overlay(*popup_exp);
pp::panopainter::close_legacy_popup_overlay(*popup_time);
};
popup_time->find<NodeButtonCustom>("panel-brush")->on_click = [this, popup_time, popup_exp, visible](Node*) {
const auto plan = pp::app::plan_tools_panel(
@@ -976,8 +950,8 @@ void App::init_menu_tools()
if (plan.hides_embedded_title)
stroke->find("title")->SetVisibility(false);
popup_exp->destroy();
popup_time->destroy();
pp::panopainter::close_legacy_popup_overlay(*popup_exp);
pp::panopainter::close_legacy_popup_overlay(*popup_time);
};
popup_time->find<NodeButtonCustom>("panel-grids")->on_click = [this, popup_time, popup_exp, visible](Node*) {
const auto plan = pp::app::plan_tools_panel(
@@ -996,8 +970,8 @@ void App::init_menu_tools()
if (plan.hides_embedded_title)
grid->find("title")->SetVisibility(false);
popup_exp->destroy();
popup_time->destroy();
pp::panopainter::close_legacy_popup_overlay(*popup_exp);
pp::panopainter::close_legacy_popup_overlay(*popup_time);
};
popup_time->find<NodeButtonCustom>("panel-animation")->on_click = [this, popup_time, popup_exp, visible](Node*) {
const auto plan = pp::app::plan_tools_panel(
@@ -1014,8 +988,8 @@ void App::init_menu_tools()
animation->SetWidthP(100);
animation->SetHeightP(100);
popup_exp->destroy();
popup_time->destroy();
pp::panopainter::close_legacy_popup_overlay(*popup_exp);
pp::panopainter::close_legacy_popup_overlay(*popup_time);
};
};
@@ -1179,8 +1153,7 @@ void App::init_menu_tools()
execute_tools_menu_plan(*this, plan);
if (plan.closes_root_popup)
{
popup_exp->mouse_release();
popup_exp->destroy();
pp::panopainter::close_legacy_popup_overlay(*popup_exp);
}
};
@@ -1189,8 +1162,7 @@ void App::init_menu_tools()
execute_tools_menu_plan(*this, plan);
if (plan.closes_root_popup)
{
popup_exp->mouse_release();
popup_exp->destroy();
pp::panopainter::close_legacy_popup_overlay(*popup_exp);
}
};
@@ -1199,16 +1171,14 @@ void App::init_menu_tools()
execute_tools_menu_plan(*this, plan);
if (plan.closes_root_popup)
{
popup_exp->mouse_release();
popup_exp->destroy();
pp::panopainter::close_legacy_popup_overlay(*popup_exp);
}
};
/*
popup_exp->find<NodeButtonCustom>("mp4test")->on_click = [this, popup_exp](Node*) {
dialog_export_mp4();
popup_exp->mouse_release();
popup_exp->destroy();
pp::panopainter::close_legacy_popup_overlay(*popup_exp);
};
*/
@@ -1221,8 +1191,7 @@ void App::init_menu_tools()
execute_tools_menu_plan(*this, plan);
if (plan.closes_root_popup)
{
popup_exp->mouse_release();
popup_exp->destroy();
pp::panopainter::close_legacy_popup_overlay(*popup_exp);
}
};
}
@@ -1249,8 +1218,7 @@ void App::init_menu_about()
execute_about_menu_plan(*this, plan);
if (plan.closes_root_popup)
{
popup->mouse_release();
popup->destroy();
pp::panopainter::close_legacy_popup_overlay(*popup);
}
};
@@ -1265,8 +1233,7 @@ void App::init_menu_about()
execute_about_menu_plan(*this, plan);
if (plan.closes_root_popup)
{
popup->mouse_release();
popup->destroy();
pp::panopainter::close_legacy_popup_overlay(*popup);
}
};
@@ -1290,8 +1257,7 @@ void App::init_menu_about()
execute_about_menu_plan(*this, plan);
if (plan.closes_root_popup)
{
popup->mouse_release();
popup->destroy();
pp::panopainter::close_legacy_popup_overlay(*popup);
}
};
}
@@ -1307,8 +1273,7 @@ void App::init_menu_about()
execute_about_menu_plan(*this, plan);
if (plan.closes_root_popup)
{
popup->mouse_release();
popup->destroy();
pp::panopainter::close_legacy_popup_overlay(*popup);
}
};
}
@@ -1326,8 +1291,7 @@ void App::init_menu_about()
execute_about_menu_plan(*this, plan);
if (plan.closes_root_popup)
{
popup->mouse_release();
popup->destroy();
pp::panopainter::close_legacy_popup_overlay(*popup);
}
};
}
@@ -1406,8 +1370,7 @@ void App::init_menu_layer()
popup->find<NodeButtonCustom>("layer-clear")->on_click = [this, popup](Node*) {
const auto plan = make_layer_menu_plan(pp::app::DocumentLayerMenuCommand::clear, *this);
execute_document_layer_menu_plan(*this, plan);
popup->mouse_release();
popup->destroy();
pp::panopainter::close_legacy_popup_overlay(*popup);
};
{
const auto plan = make_layer_menu_plan(pp::app::DocumentLayerMenuCommand::clear, *this);
@@ -1419,8 +1382,7 @@ void App::init_menu_layer()
popup->find<NodeButtonCustom>("layer-rename")->on_click = [this, popup](Node*) {
const auto plan = make_layer_menu_plan(pp::app::DocumentLayerMenuCommand::rename, *this);
execute_document_layer_menu_plan(*this, plan);
popup->mouse_release();
popup->destroy();
pp::panopainter::close_legacy_popup_overlay(*popup);
};
{
const auto plan = make_layer_menu_plan(pp::app::DocumentLayerMenuCommand::rename, *this);
@@ -1432,8 +1394,7 @@ void App::init_menu_layer()
popup->find<NodeButtonCustom>("layer-merge")->on_click = [this, popup](Node*) {
const auto plan = make_layer_menu_plan(pp::app::DocumentLayerMenuCommand::merge_down, *this);
execute_document_layer_menu_plan(*this, plan);
popup->mouse_release();
popup->destroy();
pp::panopainter::close_legacy_popup_overlay(*popup);
};
{
const auto plan = make_layer_menu_plan(pp::app::DocumentLayerMenuCommand::merge_down, *this);

View File

@@ -28,6 +28,12 @@ void activate_legacy_popup_overlay(Node& node) noexcept
node.mouse_capture();
}
void close_legacy_popup_overlay(Node& node) noexcept
{
node.mouse_release();
node.destroy();
}
pp::foundation::Status attach_legacy_overlay_node(
App& app,
const std::shared_ptr<Node>& node) noexcept

View File

@@ -14,6 +14,7 @@ void initialize_legacy_overlay_node(App& app, Node& node);
void configure_legacy_popup_overlay(Node& node) noexcept;
void activate_legacy_popup_overlay(Node& node) noexcept;
void close_legacy_popup_overlay(Node& node) noexcept;
[[nodiscard]] pp::foundation::Status attach_legacy_overlay_node(
App& app,

View File

@@ -57,8 +57,7 @@ void NodeComboBox::loaded()
m_text->set_text(m_items[index].c_str());
if (on_select)
on_select(btn, index);
popup->mouse_release();
popup->destroy();
pp::panopainter::close_legacy_popup_overlay(*popup);
};
}
}

View File

@@ -623,7 +623,7 @@ void NodePanelBrushPreset::init()
break;
}
}
popup->destroy();
pp::panopainter::close_legacy_popup_overlay(*popup);
};
};
m_btn_import = find<NodeButton>("import");