From 315e43a46923aff53a0d784b1e540449aa9cc5c5 Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Wed, 17 Sep 2014 16:02:28 +0200 Subject: [PATCH] ExpressionNode flags are now set in it's constructor. --HG-- branch : dfighter-tools --- code/studio/src/plugins/gui_editor/expression_editor.cpp | 1 - code/studio/src/plugins/gui_editor/expression_node.cpp | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/code/studio/src/plugins/gui_editor/expression_editor.cpp b/code/studio/src/plugins/gui_editor/expression_editor.cpp index 32eefbf08..4aba6c4a5 100644 --- a/code/studio/src/plugins/gui_editor/expression_editor.cpp +++ b/code/studio/src/plugins/gui_editor/expression_editor.cpp @@ -239,7 +239,6 @@ void ExpressionEditor::onItemDblClicked( QTreeWidgetItem *item ) m_nodeCount++; ExpressionNode *node = new ExpressionNode( n, info->slotNames.count() ); - node->setFlags( QGraphicsItem::ItemIsSelectable | QGraphicsItem::ItemIsMovable ); node->setSlotNames( info->slotNames ); node->setVariable( info->variable ); node->setIsValue( info->value ); diff --git a/code/studio/src/plugins/gui_editor/expression_node.cpp b/code/studio/src/plugins/gui_editor/expression_node.cpp index 2dc9cf4fb..8f3425a37 100644 --- a/code/studio/src/plugins/gui_editor/expression_node.cpp +++ b/code/studio/src/plugins/gui_editor/expression_node.cpp @@ -101,6 +101,8 @@ private: ExpressionNode::ExpressionNode( const QString &name, int slotCount, QGraphicsItem *parent ) : QGraphicsItem( parent ) { + setFlags( QGraphicsItem::ItemIsSelectable | QGraphicsItem::ItemIsMovable ); + m_w = 100; m_h = 100; m_hh = 20.0;