export ppbr wip

This commit is contained in:
2019-09-13 21:58:37 +02:00
parent bbd9dfc4a9
commit 729c73eef2
5 changed files with 21 additions and 25 deletions

View File

@@ -601,20 +601,20 @@ void App::dialog_ppbr_export()
{
auto root = layout[main_id];
auto dialog = root->add_child_ref<NodeDialogExportPPBR>();
dialog->btn_ok->on_click = [this,dialog] (Node*) {
dialog->btn_ok->on_click = [this, dialog] (Node*) {
#if __IOS__
App::I->pick_file_save("ppbr", [this](std::string path) {
presets->export_ppbr(path, {});
App::I->pick_file_save("ppbr", [this, dialog] (std::string path) {
presets->export_ppbr(path, dialog->m_header_image);
});
#else
App::I->pick_file_save({ "ppbr" }, [this](std::string path) {
std::thread([this, path] {
App::I->pick_file_save({ "ppbr" }, [this, dialog] (std::string path) {
std::thread([this, path, dialog] {
BT_SetTerminate();
presets->export_ppbr(path, {});
presets->export_ppbr(path, dialog->m_header_image);
dialog->destroy();
App::I->message_box("Export PPBR", "Brushes exported to:\n" + path);
}).detach();
});
}).detach();
});
#endif
dialog->destroy();
};
}