summaryrefslogtreecommitdiffstats
path: root/src/client/NodeModel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/NodeModel.cpp')
-rw-r--r--src/client/NodeModel.cpp13
1 files changed, 13 insertions, 0 deletions
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
@@ -219,6 +219,19 @@ NodeModel::port_value_range(SharedPtr<const PortModel> 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<const PortModel> port) const
{
const Raul::Atom& name = port->get_property(LV2_CORE__name);