From 72833b89742ff16934de362c08909c019f55e721 Mon Sep 17 00:00:00 2001 From: dmatetelki Date: Mon, 18 Aug 2014 16:37:52 +0200 Subject: [PATCH] Fixing copy+paste error --- lib/qtgraph/graphwidget.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/qtgraph/graphwidget.cpp b/lib/qtgraph/graphwidget.cpp index d4d8ea0..2763f1b 100644 --- a/lib/qtgraph/graphwidget.cpp +++ b/lib/qtgraph/graphwidget.cpp @@ -129,6 +129,7 @@ void GraphWidget::keyPressEvent(QKeyEvent *e) else insertNode(selectedNode, scene_p); } + break; } default: QGraphicsView::keyPressEvent(e); @@ -171,7 +172,7 @@ void GraphWidget::removeNode(Node* selectedNode) void GraphWidget::insertEdge(Node* selectedNode, Node* nodeUnderMouse) { const float2 source_pos = float2FromQPointF(selectedNode->pos()); - const float2 destination_pos = float2FromQPointF(selectedNode->pos()); + const float2 destination_pos = float2FromQPointF(nodeUnderMouse->pos()); if (m_graph->connected(source_pos, destination_pos)) return;