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
|
submit/cancel and input-box cancel destroy callbacks now use retained close
|
||||||
helpers from `src/legacy_ui_overlay_services.*`. Dialog lifetime still uses
|
helpers from `src/legacy_ui_overlay_services.*`. Dialog lifetime still uses
|
||||||
raw `Node` callbacks until checked handles and scoped connections land.
|
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
|
- 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
|
||||||
|
|||||||
@@ -500,6 +500,8 @@ About, changelog, settings, and user-manual close buttons now share retained
|
|||||||
destroy-on-click binding through the same overlay service.
|
destroy-on-click binding through the same overlay service.
|
||||||
Message-box submit/cancel and input-box cancel destroy callbacks now use the
|
Message-box submit/cancel and input-box cancel destroy callbacks now use the
|
||||||
same retained close binding helpers.
|
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
|
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,
|
||||||
|
|||||||
@@ -30,9 +30,7 @@ void NodeDialogBrowse::init_controls()
|
|||||||
{
|
{
|
||||||
btn_ok = find<NodeButton>("btn-ok");
|
btn_ok = find<NodeButton>("btn-ok");
|
||||||
btn_cancel = find<NodeButton>("btn-cancel");
|
btn_cancel = find<NodeButton>("btn-cancel");
|
||||||
btn_cancel->on_click = [this](Node*) {
|
pp::panopainter::bind_legacy_click_destroys_node(*btn_cancel, *this);
|
||||||
destroy();
|
|
||||||
};
|
|
||||||
btn_delete = find<NodeButton>("btn-delete");
|
btn_delete = find<NodeButton>("btn-delete");
|
||||||
btn_delete->on_click = [this](Node*) {
|
btn_delete->on_click = [this](Node*) {
|
||||||
if (!current)
|
if (!current)
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
#include "node_message_box.h"
|
#include "node_message_box.h"
|
||||||
#include "app.h"
|
#include "app.h"
|
||||||
#include "image.h"
|
#include "image.h"
|
||||||
|
#include "legacy_ui_overlay_services.h"
|
||||||
#include "platform_api/network_tls_policy.h"
|
#include "platform_api/network_tls_policy.h"
|
||||||
|
|
||||||
Node* NodeDialogCloud::clone_instantiate() const
|
Node* NodeDialogCloud::clone_instantiate() const
|
||||||
@@ -30,9 +31,7 @@ void NodeDialogCloud::init_controls()
|
|||||||
{
|
{
|
||||||
btn_ok = find<NodeButton>("btn-ok");
|
btn_ok = find<NodeButton>("btn-ok");
|
||||||
btn_cancel = find<NodeButton>("btn-cancel");
|
btn_cancel = find<NodeButton>("btn-cancel");
|
||||||
btn_cancel->on_click = [this](Node*) {
|
pp::panopainter::bind_legacy_click_destroys_node(*btn_cancel, *this);
|
||||||
destroy();
|
|
||||||
};
|
|
||||||
container = find<Node>("files-list");
|
container = find<Node>("files-list");
|
||||||
std::thread(&NodeDialogCloud::load_thumbs_thread, this).detach();
|
std::thread(&NodeDialogCloud::load_thumbs_thread, this).detach();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
#include "node_dialog_export_ppbr.h"
|
#include "node_dialog_export_ppbr.h"
|
||||||
#include "app.h"
|
#include "app.h"
|
||||||
#include "image.h"
|
#include "image.h"
|
||||||
|
#include "legacy_ui_overlay_services.h"
|
||||||
|
|
||||||
Node* NodeDialogExportPPBR::clone_instantiate() const
|
Node* NodeDialogExportPPBR::clone_instantiate() const
|
||||||
{
|
{
|
||||||
@@ -30,9 +31,7 @@ void NodeDialogExportPPBR::init_controls()
|
|||||||
m_dest_path_txt->SetVisibility(false);
|
m_dest_path_txt->SetVisibility(false);
|
||||||
btn_ok = find<NodeButton>("btn-ok");
|
btn_ok = find<NodeButton>("btn-ok");
|
||||||
btn_cancel = find<NodeButton>("btn-cancel");
|
btn_cancel = find<NodeButton>("btn-cancel");
|
||||||
btn_cancel->on_click = [this](Node*) {
|
pp::panopainter::bind_legacy_click_destroys_node(*btn_cancel, *this);
|
||||||
destroy();
|
|
||||||
};
|
|
||||||
btn_header_open = find<NodeButton>("header-open");
|
btn_header_open = find<NodeButton>("header-open");
|
||||||
btn_header_open->on_click = [this] (Node*) {
|
btn_header_open->on_click = [this] (Node*) {
|
||||||
open_header();
|
open_header();
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "node_dialog_layer_rename.h"
|
#include "node_dialog_layer_rename.h"
|
||||||
#include "canvas.h"
|
#include "canvas.h"
|
||||||
|
#include "legacy_ui_overlay_services.h"
|
||||||
#include "node_image_texture.h"
|
#include "node_image_texture.h"
|
||||||
|
|
||||||
Node* NodeDialogLayerRename::clone_instantiate() const
|
Node* NodeDialogLayerRename::clone_instantiate() const
|
||||||
@@ -26,9 +27,7 @@ void NodeDialogLayerRename::init_controls()
|
|||||||
btn_ok = find<NodeButton>("btn-ok");
|
btn_ok = find<NodeButton>("btn-ok");
|
||||||
btn_cancel = find<NodeButton>("btn-cancel");
|
btn_cancel = find<NodeButton>("btn-cancel");
|
||||||
input = find<NodeTextInput>("txt-input");
|
input = find<NodeTextInput>("txt-input");
|
||||||
btn_cancel->on_click = [this](Node*) {
|
pp::panopainter::bind_legacy_click_destroys_node(*btn_cancel, *this);
|
||||||
destroy();
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void NodeDialogLayerRename::loaded()
|
void NodeDialogLayerRename::loaded()
|
||||||
|
|||||||
@@ -32,9 +32,7 @@ void NodeDialogOpen::init_controls()
|
|||||||
{
|
{
|
||||||
btn_ok = find<NodeButton>("btn-ok");
|
btn_ok = find<NodeButton>("btn-ok");
|
||||||
btn_cancel = find<NodeButton>("btn-cancel");
|
btn_cancel = find<NodeButton>("btn-cancel");
|
||||||
btn_cancel->on_click = [this](Node*) {
|
pp::panopainter::bind_legacy_click_destroys_node(*btn_cancel, *this);
|
||||||
destroy();
|
|
||||||
};
|
|
||||||
btn_delete = find<NodeButton>("btn-delete");
|
btn_delete = find<NodeButton>("btn-delete");
|
||||||
btn_delete->on_click = [this](Node*) {
|
btn_delete->on_click = [this](Node*) {
|
||||||
if (!current)
|
if (!current)
|
||||||
@@ -179,9 +177,7 @@ void NodeDialogSave::init_controls()
|
|||||||
{
|
{
|
||||||
btn_ok = find<NodeButton>("btn-ok");
|
btn_ok = find<NodeButton>("btn-ok");
|
||||||
btn_cancel = find<NodeButton>("btn-cancel");
|
btn_cancel = find<NodeButton>("btn-cancel");
|
||||||
btn_cancel->on_click = [this](Node*) {
|
pp::panopainter::bind_legacy_click_destroys_node(*btn_cancel, *this);
|
||||||
destroy();
|
|
||||||
};
|
|
||||||
input = find<NodeTextInput>("txt-input");
|
input = find<NodeTextInput>("txt-input");
|
||||||
input->on_return = [&](NodeTextInput* target){
|
input->on_return = [&](NodeTextInput* target){
|
||||||
if (btn_ok->on_click)
|
if (btn_ok->on_click)
|
||||||
@@ -240,9 +236,7 @@ void NodeDialogNewDoc::init_controls()
|
|||||||
btn_ok = find<NodeButton>("btn-ok");
|
btn_ok = find<NodeButton>("btn-ok");
|
||||||
m_resolution = find<NodeComboBox>("resolution");
|
m_resolution = find<NodeComboBox>("resolution");
|
||||||
btn_cancel = find<NodeButton>("btn-cancel");
|
btn_cancel = find<NodeButton>("btn-cancel");
|
||||||
btn_cancel->on_click = [this](Node*) {
|
pp::panopainter::bind_legacy_click_destroys_node(*btn_cancel, *this);
|
||||||
destroy();
|
|
||||||
};
|
|
||||||
input = find<NodeTextInput>("txt-input");
|
input = find<NodeTextInput>("txt-input");
|
||||||
input->on_return = [&](NodeTextInput* target){
|
input->on_return = [&](NodeTextInput* target){
|
||||||
if (btn_ok->on_click)
|
if (btn_ok->on_click)
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
#include "node_dialog_resize.h"
|
#include "node_dialog_resize.h"
|
||||||
#include "app_core/document_resize.h"
|
#include "app_core/document_resize.h"
|
||||||
#include "canvas.h"
|
#include "canvas.h"
|
||||||
|
#include "legacy_ui_overlay_services.h"
|
||||||
#include "node_image_texture.h"
|
#include "node_image_texture.h"
|
||||||
#include <array>
|
#include <array>
|
||||||
|
|
||||||
@@ -36,9 +37,7 @@ void NodeDialogResize::init_controls()
|
|||||||
&& state.current_resolution_index < static_cast<int>(combo->m_items.size())) {
|
&& state.current_resolution_index < static_cast<int>(combo->m_items.size())) {
|
||||||
combo->m_current_index = state.current_resolution_index;
|
combo->m_current_index = state.current_resolution_index;
|
||||||
}
|
}
|
||||||
btn_cancel->on_click = [this](Node*) {
|
pp::panopainter::bind_legacy_click_destroys_node(*btn_cancel, *this);
|
||||||
destroy();
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void NodeDialogResize::loaded()
|
void NodeDialogResize::loaded()
|
||||||
|
|||||||
Reference in New Issue
Block a user