summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-10-12 17:59:33 +0000
committerDavid Robillard <d@drobilla.net>2008-10-12 17:59:33 +0000
commitb4b775fb90913f93646560cef250979a002f1fd1 (patch)
tree95f6cf6ca124093eac6c44c048fc016010d653f0 /src/gui
parent671050820a2a467b8f0ce523e87b7928eb65b424 (diff)
downloadingen-b4b775fb90913f93646560cef250979a002f1fd1.tar.gz
ingen-b4b775fb90913f93646560cef250979a002f1fd1.tar.bz2
ingen-b4b775fb90913f93646560cef250979a002f1fd1.zip
Fix blank port names for plugins without human names (ie all LADSPA and internal ones, currently).
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@1663 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/NodeModule.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/gui/NodeModule.cpp b/src/gui/NodeModule.cpp
index 7f891a51..742ad4c4 100644
--- a/src/gui/NodeModule.cpp
+++ b/src/gui/NodeModule.cpp
@@ -99,7 +99,7 @@ NodeModule::create(boost::shared_ptr<PatchCanvas> canvas, SharedPtr<NodeModel> n
}
if (human)
- ret->show_human_names(human);
+ ret->show_human_names(human); // FIXME: double port iteration
ret->resize();
ret->set_stacked_border(node->polyphonic());
@@ -123,13 +123,13 @@ NodeModule::show_human_names(bool b)
uint32_t index = 0;
for (PortVector::const_iterator i = ports().begin(); i != ports().end(); ++i) {
+ string name = node()->port(index)->symbol();
if (b) {
string hn = ((PluginModel*)node()->plugin())->port_human_name(index);
if (hn != "")
- (*i)->set_name(hn);
- } else {
- (*i)->set_name(node()->port(index)->symbol());
+ name = hn;
}
+ (*i)->set_name(name);
++index;
}
@@ -234,8 +234,11 @@ NodeModule::add_port(SharedPtr<PortModel> port, bool resize_to_fit)
uint32_t index = _ports.size(); // FIXME: kludge, engine needs to tell us this
string name = port->path().name();
- if (App::instance().configuration()->name_style() == Configuration::HUMAN && node()->plugin())
- name = ((PluginModel*)node()->plugin())->port_human_name(index);
+ if (App::instance().configuration()->name_style() == Configuration::HUMAN && node()->plugin()) {
+ string hn = ((PluginModel*)node()->plugin())->port_human_name(index);
+ if (hn != "")
+ name = hn;
+ }
Module::add_port(boost::shared_ptr<Port>(
new Port(PtrCast<NodeModule>(shared_from_this()), port, name)));