aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gui/MachinaCanvas.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/gui/MachinaCanvas.cpp b/src/gui/MachinaCanvas.cpp
index 2869c22..18d0196 100644
--- a/src/gui/MachinaCanvas.cpp
+++ b/src/gui/MachinaCanvas.cpp
@@ -126,11 +126,7 @@ MachinaCanvas::on_new_object(SharedPtr<Client::ClientObject> object)
SharedPtr<EdgeView> view(
new EdgeView(*this, tail_view, head_view, object));
- tail_view->add_connection(view.get());
- head_view->add_connection(view.get());
-
object->set_view(view);
- add_connection(view.get());
} else {
Raul::error << "Unknown object type " << type << std::endl;
@@ -144,10 +140,7 @@ MachinaCanvas::on_erase_object(SharedPtr<Client::ClientObject> object)
if (type == "machina:Node") {
// Destruction of the view will remove from the canvas
} else if (type == "machina:Edge") {
- SharedPtr<EdgeView> view = PtrCast<EdgeView>(object->view());
- if (view) {
- remove_connection(view->source(), view->dest());
- }
+ object->set_view(SharedPtr<Client::ClientObject::View>());
} else {
Raul::error << "Unknown object type " << type << std::endl;
}