add layout designer

This commit is contained in:
2019-09-26 09:55:54 +02:00
parent f9bddfddad
commit 0a8c3aeaf2
7 changed files with 35 additions and 7 deletions

View File

@@ -343,9 +343,6 @@ const Node* Node::init_template(const char* id)
{
auto node = c->clone();
add_child(node);
//node->init();
//node->create();
//node->loaded();
}
YGNodeCopyStyle(y_node, m_template->y_node);
m_template->clone_copy(this);
@@ -377,7 +374,8 @@ std::shared_ptr<Node> Node::load_template(const std::string& filename, const std
LayoutManager m;
std::shared_ptr<Node> ret;
if (m.load(filename.c_str()))
ret = std::move(m.get_ref(name.c_str())->m_children[0]);
ret = m.get_ref(name.c_str())->m_children[0]->clone();
m.unload();
return ret;
}