summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gui/NodeModule.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/gui/NodeModule.cpp b/src/gui/NodeModule.cpp
index 58366377..9f10ffe7 100644
--- a/src/gui/NodeModule.cpp
+++ b/src/gui/NodeModule.cpp
@@ -121,16 +121,20 @@ NodeModule::create(boost::shared_ptr<PatchCanvas> canvas, SharedPtr<NodeModel> n
void
NodeModule::show_human_names(bool b)
{
+ const LV2URIMap& uris = App::instance().uris();
+
if (b && node()->plugin()) {
Glib::Mutex::Lock lock(App::instance().world()->rdf_world->mutex());
- set_name(node()->plugin_model()->human_name());
+ const Raul::Atom& name_property = node()->get_property(uris.lv2_name);
+ if (name_property.type() == Atom::STRING)
+ set_name(name_property.get_string());
+ else
+ set_name(node()->plugin_model()->human_name());
} else {
b = false;
set_name(node()->symbol().c_str());
}
- const LV2URIMap& uris = App::instance().uris();
-
for (PortVector::const_iterator i = ports().begin(); i != ports().end(); ++i) {
SharedPtr<Ingen::GUI::Port> port = PtrCast<Ingen::GUI::Port>(*i);
Glib::ustring label(port->model()->symbol().c_str());
@@ -417,6 +421,12 @@ NodeModule::set_property(const URI& key, const Atom& value)
_canvas.lock()->unselect_item(shared_from_this());
}
}
+ break;
+ case Atom::STRING:
+ if (key == uris.lv2_name
+ && App::instance().configuration()->name_style() == Configuration::HUMAN) {
+ set_name(value.get_string());
+ }
default: break;
}
}