summaryrefslogtreecommitdiffstats
path: root/src/progs/ingenuity/PatchCanvas.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/progs/ingenuity/PatchCanvas.cpp')
-rw-r--r--src/progs/ingenuity/PatchCanvas.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/progs/ingenuity/PatchCanvas.cpp b/src/progs/ingenuity/PatchCanvas.cpp
index 3f9c97fa..289150de 100644
--- a/src/progs/ingenuity/PatchCanvas.cpp
+++ b/src/progs/ingenuity/PatchCanvas.cpp
@@ -174,10 +174,8 @@ PatchCanvas::connection(CountedPtr<ConnectionModel> cm)
boost::shared_ptr<LibFlowCanvas::Port> dst = get_port(dst_parent_name, cm->dst_port_path().name());
if (src && dst) {
- boost::shared_ptr<Connection> c(new Connection(shared_from_this(), cm, src, dst));
- src->add_connection(c);
- dst->add_connection(c);
- add_connection(c);
+ add_connection(boost::shared_ptr<Connection>(
+ new Connection(shared_from_this(), cm, src, dst)));
} else {
cerr << "[Canvas] ERROR: Unable to find ports to create connection." << endl;
}