Centralize retained delete confirmation closing
This commit is contained in:
@@ -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);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user