From 012fae0ef687f7f96840d6ed4ec2f334b035c861 Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Wed, 17 Sep 2014 20:54:16 +0200 Subject: [PATCH] don't evaluate the child-nodes when there are none, directly just return () --HG-- branch : dfighter-tools --- code/studio/src/plugins/gui_editor/expression_node.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/code/studio/src/plugins/gui_editor/expression_node.cpp b/code/studio/src/plugins/gui_editor/expression_node.cpp index 8a0ef774b..80ef571e2 100644 --- a/code/studio/src/plugins/gui_editor/expression_node.cpp +++ b/code/studio/src/plugins/gui_editor/expression_node.cpp @@ -297,9 +297,16 @@ QString ExpressionNode::build() const QStringList l = m_name.split( ' ' ); result = l[ 0 ]; - result += "( "; int c = m_links.count(); + if( c == 1 ) + { + result += "()"; + return result; + } + + result += "( "; + for( int i = 1; i < c; i++ ) { ExpressionLink *link = m_links[ i ];