Centralize retained delete confirmation closing

This commit is contained in:
2026-06-12 15:53:08 +02:00
parent 94ce1aec92
commit 08f6515468
5 changed files with 8 additions and 3 deletions

View File

@@ -80,7 +80,7 @@ template <class ButtonT>
void bind_legacy_click_destroys_node(ButtonT& button, Node& target) noexcept
{
button.on_click = [&target](Node*) {
target.destroy();
close_legacy_dialog_node(target);
};
}

View File

@@ -59,7 +59,7 @@ void NodeDialogBrowse::init_controls()
selected_name = "";
}
Asset::delete_file(path);
msgbox->destroy();
pp::panopainter::close_legacy_dialog_node(*msgbox);
};
(void)pp::panopainter::attach_legacy_overlay_node_to_root(*this, msgbox);
root()->update();

View File

@@ -60,7 +60,7 @@ void NodeDialogOpen::init_controls()
image_tex->tex.reset();
}
Asset::delete_file(path);
msgbox->destroy();
pp::panopainter::close_legacy_dialog_node(*msgbox);
};
(void)pp::panopainter::attach_legacy_overlay_node_to_root(*this, msgbox);
root()->update();