summaryrefslogtreecommitdiffstats
path: root/src/PatchageCanvas.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-06-09 00:23:26 +0000
committerDavid Robillard <d@drobilla.net>2011-06-09 00:23:26 +0000
commit91cdc941af88e8ba6e19673eb17825233db2218c (patch)
treefb98fc700eb745a6dee1c8bae0e281e07256965a /src/PatchageCanvas.cpp
parent69b9029a052e9d9c0d66e4b2fe954f9a6e906a92 (diff)
downloadpatchage-91cdc941af88e8ba6e19673eb17825233db2218c.tar.gz
patchage-91cdc941af88e8ba6e19673eb17825233db2218c.tar.bz2
patchage-91cdc941af88e8ba6e19673eb17825233db2218c.zip
Fix support for multiple instances of alsa clients with the same name (never consider client name an ID).
Remove Alsa specific crap from PatchagePort. Sane implementation of AlsaDriver::refresh. Fix refreshing. Remove useless Jack graph order callback. Fix double add/remove of ports to modules. git-svn-id: http://svn.drobilla.net/lad/trunk/patchage@3374 a436a847-0d15-0410-975c-d299462d15a1
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