diff options
| author | Robert Bieber <robby@bieberphoto.com> | 2010-07-29 06:41:33 +0000 |
|---|---|---|
| committer | Robert Bieber <robby@bieberphoto.com> | 2010-07-29 06:41:33 +0000 |
| commit | b22077cd600c183e406dea79548b50b5ec5e3585 (patch) | |
| tree | 2db39ddb39364440dcfc869c94fc3bb6ba71479e /utils/themeeditor/models | |
| parent | 85040111fe204f805cc296a9de8715cb6d858b76 (diff) | |
| download | rockbox-b22077cd600c183e406dea79548b50b5ec5e3585.zip rockbox-b22077cd600c183e406dea79548b50b5ec5e3585.tar.gz rockbox-b22077cd600c183e406dea79548b50b5ec5e3585.tar.bz2 rockbox-b22077cd600c183e406dea79548b50b5ec5e3585.tar.xz | |
Theme Editor: Renderer now correctly handles special case with only one branch in a conditional
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27609 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'utils/themeeditor/models')
| -rw-r--r-- | utils/themeeditor/models/parsetreenode.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/utils/themeeditor/models/parsetreenode.cpp b/utils/themeeditor/models/parsetreenode.cpp index 25351bf..338f885 100644 --- a/utils/themeeditor/models/parsetreenode.cpp +++ b/utils/themeeditor/models/parsetreenode.cpp @@ -560,7 +560,9 @@ void ParseTreeNode::render(const RBRenderInfo &info, RBViewport* viewport, else if(element->type == CONDITIONAL) { int child = evalTag(info, true, element->children_count).toInt(); - children[element->params_count + child]->render(info, viewport, true); + if(child < children.count()) + children[element->params_count + child] + ->render(info, viewport, true); } else if(element->type == LINE_ALTERNATOR) { @@ -1016,6 +1018,8 @@ QVariant ParseTreeNode::evalTag(const RBRenderInfo& info, bool conditional, if(child < branches) return child; + else if(branches == 1) + return 2; else return branches - 1; } |