From 071e36b69b5bcc203f70179580c8bed924b7305b Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 12 Jun 2012 21:46:22 +0000 Subject: Add "expose" (to parent) operation for ports. Partially implments #39. Export all the way to root has a few issues, I am considering this functionality good enough for now. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4496 a436a847-0d15-0410-975c-d299462d15a1 --- src/client/NodeModel.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/client') diff --git a/src/client/NodeModel.cpp b/src/client/NodeModel.cpp index ad3ce273..a92d5aae 100644 --- a/src/client/NodeModel.cpp +++ b/src/client/NodeModel.cpp @@ -218,6 +218,19 @@ NodeModel::port_value_range(SharedPtr port, } } +std::string +NodeModel::label() const +{ + const Raul::Atom& name_property = get_property(_uris.lv2_name); + if (name_property.type() == _uris.forge.String) { + return name_property.get_string(); + } else if (plugin_model()) { + return plugin_model()->human_name(); + } else { + return symbol().c_str(); + } +} + std::string NodeModel::port_label(SharedPtr port) const { -- cgit v1.2.1