diff options
author | Robert Bieber <robby@bieberphoto.com> | 2010-06-02 06:41:41 +0000 |
---|---|---|
committer | Robert Bieber <robby@bieberphoto.com> | 2010-06-02 06:41:41 +0000 |
commit | e25c903bfecd78aac3a8f01aa8e75dc39e42df34 (patch) | |
tree | e755c327b46556276162842ccf0c54e659e77e34 /utils/themeeditor/parsetreenode.cpp | |
parent | 4003f35dc79c4678526d2ee3a510963713ce88b8 (diff) |
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
Diffstat (limited to 'utils/themeeditor/parsetreenode.cpp')
-rw-r--r-- | utils/themeeditor/parsetreenode.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
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: |