summaryrefslogtreecommitdiffstats
path: root/src/JackDriver.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-07-24 23:10:43 +0000
committerDavid Robillard <d@drobilla.net>2007-07-24 23:10:43 +0000
commit35b1c7c0683a72978f646c883f411e1eabd595ae (patch)
treeeff7d5e6048ed320916ec9a2f11768200361cec3 /src/JackDriver.cpp
parent560fac6a42644bd7584db5f53db19c936ef50ab0 (diff)
downloadpatchage-35b1c7c0683a72978f646c883f411e1eabd595ae.tar.gz
patchage-35b1c7c0683a72978f646c883f411e1eabd595ae.tar.bz2
patchage-35b1c7c0683a72978f646c883f411e1eabd595ae.zip
Possibly fix overlapping MIDI ports (fix ticket 10).
git-svn-id: http://svn.drobilla.net/lad/patchage@616 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/JackDriver.cpp')
-rw-r--r--src/JackDriver.cpp16
1 files changed, 3 insertions, 13 deletions
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<PatchagePort> port = boost::dynamic_pointer_cast<PatchagePort>(*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<string>::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) {