From e25c903bfecd78aac3a8f01aa8e75dc39e42df34 Mon Sep 17 00:00:00 2001 From: Robert Bieber Date: Wed, 2 Jun 2010 06:41:41 +0000 Subject: 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 --- utils/themeeditor/parsetreenode.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'utils/themeeditor/parsetreenode.cpp') diff --git a/utils/themeeditor/parsetreenode.cpp b/utils/themeeditor/parsetreenode.cpp index 70124c338d..63555ae616 100644 --- a/utils/themeeditor/parsetreenode.cpp +++ b/utils/themeeditor/parsetreenode.cpp @@ -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: -- cgit v1.2.3