Centralize service adapter dialog closing

This commit is contained in:
2026-06-12 16:39:29 +02:00
parent 84373f26e7
commit e89d882022
4 changed files with 13 additions and 5 deletions

View File

@@ -580,6 +580,10 @@ agent or engineer to remove them without reconstructing context from chat.
color-wheel, color-quad, and canvas gesture-end capture release now route
through `src/legacy_ui_overlay_services.*`. The controls still own raw event
callback targets and public `Node` capture state.
- 2026-06-12: DEBT-0063/DEBT-0058 were narrowed again. Legacy document-open
import/discard prompts and brush-package export completion now route retained
dialog closing through `src/legacy_ui_overlay_services.*` instead of direct
`destroy()` calls from service adapters.
- 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

View File

@@ -533,6 +533,8 @@ Canvas mode mouse-capture release for camera, paint, line, grid, mask, and fill
interactions now routes through the retained capture-release helper.
Button, slider, scroll, color-wheel, color-quad, and canvas gesture-end capture
release now route through that same helper.
Legacy document-open import/discard prompts and brush-package export completion
now route retained dialog closing through the same 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,

View File

@@ -3,6 +3,7 @@
#include "legacy_brush_package_export_services.h"
#include "app.h"
#include "legacy_ui_overlay_services.h"
#include "node_dialog_export_ppbr.h"
#include "node_panel_brush.h"
@@ -49,7 +50,7 @@ public:
std::thread([app, dialog, path_string, info] {
BT_SetTerminate();
app->presets->export_ppbr(path_string, info);
dialog->destroy();
pp::panopainter::close_legacy_dialog_node(*dialog);
const auto plan = pp::app::plan_brush_package_export_success_dialog(path_string);
app->message_box(plan.title, plan.message, plan.show_cancel);
}).detach();
@@ -94,7 +95,7 @@ pp::foundation::Status execute_legacy_brush_package_export(
void complete_legacy_brush_package_export(NodeDialogExportPPBR& dialog, bool saved)
{
if (saved) {
dialog.destroy();
pp::panopainter::close_legacy_dialog_node(dialog);
}
}

View File

@@ -6,6 +6,7 @@
#include "legacy_brush_package_import_services.h"
#include "legacy_canvas_view_services.h"
#include "legacy_history_services.h"
#include "legacy_ui_overlay_services.h"
#include "log.h"
#include "node_panel_brush.h"
#include "node_panel_layer.h"
@@ -61,7 +62,7 @@ public:
path);
if (!status.ok())
LOG("ABR import failed: %s", status.message);
target->destroy();
pp::panopainter::close_legacy_dialog_node(*target);
};
}
@@ -76,7 +77,7 @@ public:
path);
if (!status.ok())
LOG("PPBR import failed: %s", status.message);
target->destroy();
pp::panopainter::close_legacy_dialog_node(*target);
};
}
@@ -94,7 +95,7 @@ public:
true);
mb->on_submit = [app, route](Node* target) {
open_legacy_project(*app, route);
target->destroy();
pp::panopainter::close_legacy_dialog_node(*target);
};
}