forked from len0rd/rockbox
Theme Editor: Fixed bugs in code generation and viewport parsing
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26464 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
4003f35dc7
commit
e25c903bfe
2 changed files with 15 additions and 7 deletions
|
@ -97,6 +97,14 @@ QString ParseTreeNode::genCode() const
|
|||
{
|
||||
|
||||
case VIEWPORT:
|
||||
buffer.append(children[0]->genCode());
|
||||
if(!children[0]->isParam()
|
||||
&& children[0]->getElement()->type == TAG)
|
||||
buffer.append('\n');
|
||||
for(int i = 1; i < children.count(); i++)
|
||||
buffer.append(children[i]->genCode());
|
||||
break;
|
||||
|
||||
case LINE:
|
||||
for(int i = 0; i < children.count(); i++)
|
||||
{
|
||||
|
@ -107,9 +115,10 @@ QString ParseTreeNode::genCode() const
|
|||
if(children[i]->element->type == TAG)
|
||||
buffer.append(TAGSYM);
|
||||
buffer.append(children[i]->genCode());
|
||||
if(element->type == LINE || i == 0)
|
||||
buffer.append('\n');
|
||||
buffer.append('\n');
|
||||
}
|
||||
if(children.count() == 0)
|
||||
buffer.append('\n');
|
||||
break;
|
||||
|
||||
case SUBLINES:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue