ExpressionNode flags are now set in it's constructor.

--HG--
branch : dfighter-tools
This commit is contained in:
dfighter1985 2014-09-17 16:02:28 +02:00
parent bf12cbc53c
commit 315e43a469
2 changed files with 2 additions and 1 deletions

View file

@ -239,7 +239,6 @@ void ExpressionEditor::onItemDblClicked( QTreeWidgetItem *item )
m_nodeCount++; m_nodeCount++;
ExpressionNode *node = new ExpressionNode( n, info->slotNames.count() ); ExpressionNode *node = new ExpressionNode( n, info->slotNames.count() );
node->setFlags( QGraphicsItem::ItemIsSelectable | QGraphicsItem::ItemIsMovable );
node->setSlotNames( info->slotNames ); node->setSlotNames( info->slotNames );
node->setVariable( info->variable ); node->setVariable( info->variable );
node->setIsValue( info->value ); node->setIsValue( info->value );

View file

@ -101,6 +101,8 @@ private:
ExpressionNode::ExpressionNode( const QString &name, int slotCount, QGraphicsItem *parent ) : ExpressionNode::ExpressionNode( const QString &name, int slotCount, QGraphicsItem *parent ) :
QGraphicsItem( parent ) QGraphicsItem( parent )
{ {
setFlags( QGraphicsItem::ItemIsSelectable | QGraphicsItem::ItemIsMovable );
m_w = 100; m_w = 100;
m_h = 100; m_h = 100;
m_hh = 20.0; m_hh = 20.0;