minor code improvements

This commit is contained in:
itsmattkc
2019-07-17 15:39:25 -04:00
parent 9633028f99
commit a5b8215f98
+2 -5
View File
@@ -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()) {