fix iOS text input and export ppbr

This commit is contained in:
2019-09-19 15:25:33 +02:00
parent 77a3bdde03
commit b8c646f748
6 changed files with 27 additions and 22 deletions

View File

@@ -38,7 +38,7 @@ void NodeDialogExportPPBR::init_controls()
};
btn_header_clear = find<NodeButton>("header-clear");
btn_header_clear->on_click = [this] (Node*) {
m_header_image.destroy();
m_header_image.reset();
img_header->tex.destroy();
txt_header_descr->SetVisibility(true);
};
@@ -57,9 +57,10 @@ void NodeDialogExportPPBR::init_controls()
void NodeDialogExportPPBR::open_header()
{
App::I->pick_image([this](std::string path) {
m_header_image.load(path);
m_header_image.resize(256, 128);
img_header->tex.create(m_header_image);
m_header_image = std::make_shared<Image>();
m_header_image->load(path);
m_header_image->resize(256, 128);
img_header->tex.create(*m_header_image);
txt_header_descr->SetVisibility(false);
});
}