replace kWidget enum with string
This commit is contained in:
@@ -92,16 +92,8 @@ bool LayoutManager::parse(const std::string& xml_string) noexcept
|
||||
if (p == m_layouts.end())
|
||||
{
|
||||
auto& node = m_layouts[id];
|
||||
kWidget node_id = (kWidget)const_hash(current->Name());
|
||||
switch (node_id)
|
||||
{
|
||||
case kWidget::Border:
|
||||
node.reset(new NodeBorder());
|
||||
break;
|
||||
default:
|
||||
node.reset(new Node());
|
||||
break;
|
||||
}
|
||||
std::string node_name = current->Name();
|
||||
node.reset(node_name == "border" ? new NodeBorder : new Node);
|
||||
node->set_manager(this);
|
||||
// try to copy the old size values
|
||||
if (old.count(id))
|
||||
|
||||
Reference in New Issue
Block a user