diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/AlsaDriver.cpp | 10 | ||||
-rw-r--r-- | src/JackDriver.cpp | 8 | ||||
-rw-r--r-- | src/Patchage.cpp | 6 |
3 files changed, 6 insertions, 18 deletions
diff --git a/src/AlsaDriver.cpp b/src/AlsaDriver.cpp index 24cb850..0e92b2b 100644 --- a/src/AlsaDriver.cpp +++ b/src/AlsaDriver.cpp @@ -131,8 +131,6 @@ AlsaDriver::refresh_ports() bool is_duplex = false; bool is_application = true; - set<SharedPtr<PatchageModule> > resized_modules; - while (snd_seq_query_next_client (_seq, cinfo) >= 0) { snd_seq_port_info_set_client(pinfo, snd_seq_client_info_get_client(cinfo)); snd_seq_port_info_set_port(pinfo, -1); @@ -196,7 +194,6 @@ AlsaDriver::refresh_ports() m->add_port(create_port(m, port_name, true, addr)); m->add_port(create_port(m, port_name, false, addr)); } - resized_modules.insert(m); } } else { // non-application input/output ports (hw interface, etc) go on separate modules @@ -225,7 +222,6 @@ AlsaDriver::refresh_ports() if (!m->get_port(port_name)) { m->add_port(create_port(m, port_name, is_input, addr)); - resized_modules.insert(m); } } else { // two ports to add @@ -249,7 +245,6 @@ AlsaDriver::refresh_ports() if (!m->get_port(port_name)) { m->add_port(create_port(m, port_name, true, addr)); - resized_modules.insert(m); } type = Output; @@ -270,16 +265,11 @@ AlsaDriver::refresh_ports() if (!m->get_port(port_name)) { m->add_port(create_port(m, port_name, false, addr)); - resized_modules.insert(m); } } } } } - - for (set<SharedPtr<PatchageModule> >::const_iterator i = resized_modules.begin(); - i != resized_modules.end(); ++i) - (*i)->resize(); } diff --git a/src/JackDriver.cpp b/src/JackDriver.cpp index 03284d9..7a3e66d 100644 --- a/src/JackDriver.cpp +++ b/src/JackDriver.cpp @@ -206,8 +206,6 @@ JackDriver::refresh() string client2_name; string port2_name; - set<SharedPtr<PatchageModule> > resized_modules; - // Add all ports if (ports) for (int i=0; ports[i]; ++i) { @@ -262,8 +260,6 @@ JackDriver::refresh() if (!m->get_port(jack_port_short_name(port))) { m->add_port(create_port(m, port)); } - - resized_modules.insert(m); } // Add all connections @@ -325,10 +321,6 @@ JackDriver::refresh() free(connected_ports); } } - - for (set<SharedPtr<PatchageModule> >::const_iterator i = resized_modules.begin(); - i != resized_modules.end(); ++i) - (*i)->resize(); free(ports); } diff --git a/src/Patchage.cpp b/src/Patchage.cpp index bf8fa25..45ad7b9 100644 --- a/src/Patchage.cpp +++ b/src/Patchage.cpp @@ -396,6 +396,12 @@ Patchage::refresh() if (_alsa_driver) _alsa_driver->refresh(); #endif + + for (ItemList::iterator i = _canvas->items().begin(); i != _canvas->items().end(); ++i) { + SharedPtr<Module> module = PtrCast<Module>(*i); + if (module) + module->resize(); + } } } |