minor code improvements
This commit is contained in:
@@ -93,7 +93,7 @@ bool NodeViewItem::IsExpanded()
|
|||||||
|
|
||||||
void NodeViewItem::SetExpanded(bool e)
|
void NodeViewItem::SetExpanded(bool e)
|
||||||
{
|
{
|
||||||
if (expanded_ = e) {
|
if (expanded_ == e) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -286,10 +286,7 @@ void NodeViewItem::mousePressEvent(QGraphicsSceneMouseEvent *event)
|
|||||||
// Create draggable object
|
// Create draggable object
|
||||||
dragging_edge_ = new NodeViewEdge();
|
dragging_edge_ = new NodeViewEdge();
|
||||||
|
|
||||||
// Clear any existing node edge command
|
// Set up a QUndoCommand to make this action undoable
|
||||||
// FIXME: Is this ever necessary?
|
|
||||||
delete node_edge_change_command_;
|
|
||||||
|
|
||||||
node_edge_change_command_ = new QUndoCommand();
|
node_edge_change_command_ = new QUndoCommand();
|
||||||
|
|
||||||
if (param->type() == NodeParam::kOutput || param->edges().isEmpty()) {
|
if (param->type() == NodeParam::kOutput || param->edges().isEmpty()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user