summaryrefslogtreecommitdiffstats
path: root/src/PatchageCanvas.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/PatchageCanvas.cpp')
-rw-r--r--src/PatchageCanvas.cpp16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/PatchageCanvas.cpp b/src/PatchageCanvas.cpp
index 69633c8..ebbfc39 100644
--- a/src/PatchageCanvas.cpp
+++ b/src/PatchageCanvas.cpp
@@ -98,22 +98,16 @@ PatchageCanvas::find_port(const PortID& id)
return pp;
}
-PatchagePort*
+void
PatchageCanvas::remove_port(const PortID& id)
{
PatchagePort* const port = find_port(id);
- if (!port)
- return port;
+ if (!port) {
+ Raul::error << "Failed to find port " << id << " to remove" << std::endl;
+ }
_port_index.erase(id);
-
- PatchageModule* module = dynamic_cast<PatchageModule*>(port->module());
- if (!module)
- return port;
-
- module->remove_port(port);
- _app->enqueue_resize(module);
- return port;
+ delete port;
}
void