diff options
author | David Robillard <d@drobilla.net> | 2010-01-29 07:58:13 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2010-01-29 07:58:13 +0000 |
commit | f02ac2f82a0342c3e548a81950734b4bce383b7d (patch) | |
tree | 06a51f5be2d41bdd8a52f1a6f8888f5f4d3db5f5 /src/gui/NodeModule.cpp | |
parent | 96613df7830699dbbfb5c2d9fe3ebdb0598e6aca (diff) | |
download | ingen-f02ac2f82a0342c3e548a81950734b4bce383b7d.tar.gz ingen-f02ac2f82a0342c3e548a81950734b4bce383b7d.tar.bz2 ingen-f02ac2f82a0342c3e548a81950734b4bce383b7d.zip |
Improved/quicker/easier handling of control port ranges.
* Add "Set minimum to current value", "Set maximum to current value",
and "Reset range" to control port context menu.
* Only serialise properties (e.g. lv2:minimum) if they differ from
the meta object's (prototype's, e.g. plugin) value.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2395 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui/NodeModule.cpp')
-rw-r--r-- | src/gui/NodeModule.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gui/NodeModule.cpp b/src/gui/NodeModule.cpp index 69b8eb55..d9680237 100644 --- a/src/gui/NodeModule.cpp +++ b/src/gui/NodeModule.cpp @@ -379,14 +379,14 @@ NodeModule::store_location() const float x = static_cast<float>(property_x()); const float y = static_cast<float>(property_y()); - const Atom& existing_x = _node->get_property("ingen-ui:canvas-x"); - const Atom& existing_y = _node->get_property("ingen-ui:canvas-y"); + const Atom& existing_x = _node->get_property("ingenui:canvas-x"); + const Atom& existing_y = _node->get_property("ingenui:canvas-y"); if (existing_x.type() != Atom::FLOAT || existing_y.type() != Atom::FLOAT || existing_x.get_float() != x || existing_y.get_float() != y) { Shared::Resource::Properties props; - props.insert(make_pair("ingen-ui:canvas-x", Atom(x))); - props.insert(make_pair("ingen-ui:canvas-y", Atom(y))); + props.insert(make_pair("ingenui:canvas-x", Atom(x))); + props.insert(make_pair("ingenui:canvas-y", Atom(y))); App::instance().engine()->put(_node->path(), props); } } @@ -397,9 +397,9 @@ NodeModule::set_property(const URI& key, const Atom& value) { switch (value.type()) { case Atom::FLOAT: - if (key.str() == "ingen-ui:canvas-x") { + if (key.str() == "ingenui:canvas-x") { move_to(value.get_float(), property_y()); - } else if (key.str() == "ingen-ui:canvas-y") { + } else if (key.str() == "ingenui:canvas-y") { move_to(property_x(), value.get_float()); } break; |