fix export ppbr panel

This commit is contained in:
2019-09-19 23:54:18 +02:00
parent abaf82ba24
commit 7eebabff19
2 changed files with 5 additions and 5 deletions

View File

@@ -201,7 +201,7 @@ void App::pick_file_save(const std::string& type, std::function<void(std::string
auto mb = input_box("Insert", "File name");
std::string placeholder = "name." + type;
mb->m_field_text->set_text(placeholder.c_str());
mb->on_submit = [this, writer, type, callback] (Node* target, std::string name) {
mb->on_submit = [this, writer, type, callback, mb] (Node* target, std::string name) {
std::string ext = "." + type;
std::string path = data_path + "/" + name;
if (name.find(ext) == std::string::npos)
@@ -211,13 +211,13 @@ void App::pick_file_save(const std::string& type, std::function<void(std::string
dispatch_async(dispatch_get_main_queue(), ^{
[ios_view pick_file_save:path];
});
target->destroy();
mb->destroy();
callback(true);
}).detach();
};
mb->btn_cancel->on_click = [=] (Node* target) {
callback(false);
target->destroy();
mb->destroy();
};
}
#else