Centralize retained dialog cancel bindings
This commit is contained in:
@@ -521,6 +521,10 @@ agent or engineer to remove them without reconstructing context from chat.
|
||||
submit/cancel and input-box cancel destroy callbacks now use retained close
|
||||
helpers from `src/legacy_ui_overlay_services.*`. Dialog lifetime still uses
|
||||
raw `Node` callbacks until checked handles and scoped connections land.
|
||||
- 2026-06-12: DEBT-0063/DEBT-0058 were narrowed again. Document open/save/new/
|
||||
browse/resize, layer-rename, cloud-browse, and PPBR export dialog cancel
|
||||
buttons now bind retained destroy-on-click behavior through
|
||||
`src/legacy_ui_overlay_services.*`.
|
||||
- 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
|
||||
|
||||
@@ -500,6 +500,8 @@ About, changelog, settings, and user-manual close buttons now share retained
|
||||
destroy-on-click binding through the same overlay service.
|
||||
Message-box submit/cancel and input-box cancel destroy callbacks now use the
|
||||
same retained close binding helpers.
|
||||
Document open/save/new/browse/resize, layer-rename, cloud-browse, and PPBR
|
||||
export dialog cancel buttons now use those same retained close helpers.
|
||||
Raw popup callback captures and full close/capture ownership remain part of
|
||||
`DEBT-0063`.
|
||||
`pano_cli inspect-image` exposes PNG IHDR metadata as JSON,
|
||||
|
||||
@@ -30,9 +30,7 @@ void NodeDialogBrowse::init_controls()
|
||||
{
|
||||
btn_ok = find<NodeButton>("btn-ok");
|
||||
btn_cancel = find<NodeButton>("btn-cancel");
|
||||
btn_cancel->on_click = [this](Node*) {
|
||||
destroy();
|
||||
};
|
||||
pp::panopainter::bind_legacy_click_destroys_node(*btn_cancel, *this);
|
||||
btn_delete = find<NodeButton>("btn-delete");
|
||||
btn_delete->on_click = [this](Node*) {
|
||||
if (!current)
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "node_message_box.h"
|
||||
#include "app.h"
|
||||
#include "image.h"
|
||||
#include "legacy_ui_overlay_services.h"
|
||||
#include "platform_api/network_tls_policy.h"
|
||||
|
||||
Node* NodeDialogCloud::clone_instantiate() const
|
||||
@@ -30,9 +31,7 @@ void NodeDialogCloud::init_controls()
|
||||
{
|
||||
btn_ok = find<NodeButton>("btn-ok");
|
||||
btn_cancel = find<NodeButton>("btn-cancel");
|
||||
btn_cancel->on_click = [this](Node*) {
|
||||
destroy();
|
||||
};
|
||||
pp::panopainter::bind_legacy_click_destroys_node(*btn_cancel, *this);
|
||||
container = find<Node>("files-list");
|
||||
std::thread(&NodeDialogCloud::load_thumbs_thread, this).detach();
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "node_dialog_export_ppbr.h"
|
||||
#include "app.h"
|
||||
#include "image.h"
|
||||
#include "legacy_ui_overlay_services.h"
|
||||
|
||||
Node* NodeDialogExportPPBR::clone_instantiate() const
|
||||
{
|
||||
@@ -30,9 +31,7 @@ void NodeDialogExportPPBR::init_controls()
|
||||
m_dest_path_txt->SetVisibility(false);
|
||||
btn_ok = find<NodeButton>("btn-ok");
|
||||
btn_cancel = find<NodeButton>("btn-cancel");
|
||||
btn_cancel->on_click = [this](Node*) {
|
||||
destroy();
|
||||
};
|
||||
pp::panopainter::bind_legacy_click_destroys_node(*btn_cancel, *this);
|
||||
btn_header_open = find<NodeButton>("header-open");
|
||||
btn_header_open->on_click = [this] (Node*) {
|
||||
open_header();
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "log.h"
|
||||
#include "node_dialog_layer_rename.h"
|
||||
#include "canvas.h"
|
||||
#include "legacy_ui_overlay_services.h"
|
||||
#include "node_image_texture.h"
|
||||
|
||||
Node* NodeDialogLayerRename::clone_instantiate() const
|
||||
@@ -26,9 +27,7 @@ void NodeDialogLayerRename::init_controls()
|
||||
btn_ok = find<NodeButton>("btn-ok");
|
||||
btn_cancel = find<NodeButton>("btn-cancel");
|
||||
input = find<NodeTextInput>("txt-input");
|
||||
btn_cancel->on_click = [this](Node*) {
|
||||
destroy();
|
||||
};
|
||||
pp::panopainter::bind_legacy_click_destroys_node(*btn_cancel, *this);
|
||||
}
|
||||
|
||||
void NodeDialogLayerRename::loaded()
|
||||
|
||||
@@ -32,9 +32,7 @@ void NodeDialogOpen::init_controls()
|
||||
{
|
||||
btn_ok = find<NodeButton>("btn-ok");
|
||||
btn_cancel = find<NodeButton>("btn-cancel");
|
||||
btn_cancel->on_click = [this](Node*) {
|
||||
destroy();
|
||||
};
|
||||
pp::panopainter::bind_legacy_click_destroys_node(*btn_cancel, *this);
|
||||
btn_delete = find<NodeButton>("btn-delete");
|
||||
btn_delete->on_click = [this](Node*) {
|
||||
if (!current)
|
||||
@@ -179,9 +177,7 @@ void NodeDialogSave::init_controls()
|
||||
{
|
||||
btn_ok = find<NodeButton>("btn-ok");
|
||||
btn_cancel = find<NodeButton>("btn-cancel");
|
||||
btn_cancel->on_click = [this](Node*) {
|
||||
destroy();
|
||||
};
|
||||
pp::panopainter::bind_legacy_click_destroys_node(*btn_cancel, *this);
|
||||
input = find<NodeTextInput>("txt-input");
|
||||
input->on_return = [&](NodeTextInput* target){
|
||||
if (btn_ok->on_click)
|
||||
@@ -240,9 +236,7 @@ void NodeDialogNewDoc::init_controls()
|
||||
btn_ok = find<NodeButton>("btn-ok");
|
||||
m_resolution = find<NodeComboBox>("resolution");
|
||||
btn_cancel = find<NodeButton>("btn-cancel");
|
||||
btn_cancel->on_click = [this](Node*) {
|
||||
destroy();
|
||||
};
|
||||
pp::panopainter::bind_legacy_click_destroys_node(*btn_cancel, *this);
|
||||
input = find<NodeTextInput>("txt-input");
|
||||
input->on_return = [&](NodeTextInput* target){
|
||||
if (btn_ok->on_click)
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "node_dialog_resize.h"
|
||||
#include "app_core/document_resize.h"
|
||||
#include "canvas.h"
|
||||
#include "legacy_ui_overlay_services.h"
|
||||
#include "node_image_texture.h"
|
||||
#include <array>
|
||||
|
||||
@@ -36,9 +37,7 @@ void NodeDialogResize::init_controls()
|
||||
&& state.current_resolution_index < static_cast<int>(combo->m_items.size())) {
|
||||
combo->m_current_index = state.current_resolution_index;
|
||||
}
|
||||
btn_cancel->on_click = [this](Node*) {
|
||||
destroy();
|
||||
};
|
||||
pp::panopainter::bind_legacy_click_destroys_node(*btn_cancel, *this);
|
||||
}
|
||||
|
||||
void NodeDialogResize::loaded()
|
||||
|
||||
Reference in New Issue
Block a user