Centralize retained dialog close bindings

This commit is contained in:
2026-06-12 15:27:13 +02:00
parent 9b482d7f6b
commit d60f4d30e2
7 changed files with 22 additions and 4 deletions

View File

@@ -74,4 +74,12 @@ void bind_legacy_popup_close_destroys_overlay(
};
}
template <class ButtonT>
void bind_legacy_click_destroys_node(ButtonT& button, Node& target) noexcept
{
button.on_click = [&target](Node*) {
target.destroy();
};
}
} // namespace pp::panopainter