From 35b1c7c0683a72978f646c883f411e1eabd595ae Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 24 Jul 2007 23:10:43 +0000 Subject: Possibly fix overlapping MIDI ports (fix ticket 10). git-svn-id: http://svn.drobilla.net/lad/patchage@616 a436a847-0d15-0410-975c-d299462d15a1 --- src/JackDriver.cpp | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'src/JackDriver.cpp') diff --git a/src/JackDriver.cpp b/src/JackDriver.cpp index e088590..5572769 100644 --- a/src/JackDriver.cpp +++ b/src/JackDriver.cpp @@ -126,11 +126,14 @@ JackDriver::destroy_all_ports() boost::shared_ptr port = boost::dynamic_pointer_cast(*p); if (port && port->type() == JACK_AUDIO || port->type() == JACK_MIDI) { module->remove_port(port); + port->hide(); } } if (module->ports().empty()) _app->canvas()->remove_item(module); + else + module->resize(); } } @@ -258,19 +261,6 @@ JackDriver::refresh() m->resize(); } - - // Remove any since-removed ports - /*for (list::iterator i = _removed_ports.begin(); i != _removed_ports.end(); ++i) { - const string module_name = (*i).substr(0, i->find(":")); - const string port_name = (*i).substr(i->find(":")+1); - - for (ItemMap::iterator m = _app->canvas()->items().begin(); m != _app->canvas()->items().end(); ++m) { - if (m->second->name() == module_name) - m->second->remove_port(port_name); - } - }*/ - - // Add all connections if (ports) for (int i=0; ports[i]; ++i) { -- cgit v1.2.1