Centralize retained dialog cancel bindings

This commit is contained in:
2026-06-12 15:34:03 +02:00
parent 14ccf67acd
commit 0c41101f5f
8 changed files with 18 additions and 24 deletions

View File

@@ -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();