summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rw-r--r--utils/themeeditor/models/parsetreenode.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/utils/themeeditor/models/parsetreenode.cpp b/utils/themeeditor/models/parsetreenode.cpp
index 1dedd4a689..9f802ae60f 100644
--- a/utils/themeeditor/models/parsetreenode.cpp
+++ b/utils/themeeditor/models/parsetreenode.cpp
@@ -154,7 +154,10 @@ QString ParseTreeNode::genCode() const
buffer.append(children[i]->genCode());
}
if(openConditionals == 0
- && !(parent && parent->element->type == LINE_ALTERNATOR))
+ && !(parent && parent->element->type == LINE_ALTERNATOR)
+ && !(children.count() > 0 &&
+ children[children.count() - 1]->getElement()->type
+ == COMMENT))
{
buffer.append('\n');
}