summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2009-05-28 15:18:51 +0000
committerDavid Robillard <d@drobilla.net>2009-05-28 15:18:51 +0000
commiteae3b1c1e100fc1b705a2d664cffae4aa5802568 (patch)
tree6828e02a8a32f7329728029630a34182498f5c3b /src
parent6617930ccdc4f224fb6c7f4fe670cbd4374c6dae (diff)
downloadingen-eae3b1c1e100fc1b705a2d664cffae4aa5802568.tar.gz
ingen-eae3b1c1e100fc1b705a2d664cffae4aa5802568.tar.bz2
ingen-eae3b1c1e100fc1b705a2d664cffae4aa5802568.zip
Fix property saving to/from file (e.g. module locations).
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2024 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r--src/gui/NodeModule.cpp1
-rw-r--r--src/serialisation/Parser.cpp6
2 files changed, 4 insertions, 3 deletions
diff --git a/src/gui/NodeModule.cpp b/src/gui/NodeModule.cpp
index 99ffe4e3..a85a50b8 100644
--- a/src/gui/NodeModule.cpp
+++ b/src/gui/NodeModule.cpp
@@ -377,6 +377,7 @@ NodeModule::store_location()
void
NodeModule::set_property(const URI& key, const Atom& value)
{
+ cerr << "SET " << key << " = " << value << " :: " << value.type() << endl;
switch (value.type()) {
case Atom::FLOAT:
if (key.str() == "ingenuity:canvas-x") {
diff --git a/src/serialisation/Parser.cpp b/src/serialisation/Parser.cpp
index 41b777a3..4085a8fc 100644
--- a/src/serialisation/Parser.cpp
+++ b/src/serialisation/Parser.cpp
@@ -488,9 +488,9 @@ Parser::parse_patch(
if (node.type() == Redland::Node::RESOURCE && type_i != types.end()) {
const string key = world->rdf_world->qualify(predicate.to_string());
if (patch_i != patch_nodes.end()) {
- patch_i->second.insert(make_pair(key, object));
+ patch_i->second.insert(make_pair(key, AtomRDF::node_to_atom(object)));
} else if (plug_i != plugin_nodes.end()) {
- plug_i->second.insert(make_pair(key, object));
+ plug_i->second.insert(make_pair(key, AtomRDF::node_to_atom(object)));
} else {
cerr << "WARNING: Unrecognized node: " << node.to_string() << endl;
}
@@ -594,7 +594,7 @@ Parser::parse_patch(
Objects::iterator ports_i = patch_ports.find(port_uri);
if (ports_i == patch_ports.end())
ports_i = patch_ports.insert(make_pair(port_uri, Properties())).first;
- ports_i->second.insert(make_pair(key, (*i)["val"]));
+ ports_i->second.insert(make_pair(key, AtomRDF::node_to_atom((*i)["val"])));
}
for (Objects::iterator i = patch_ports.begin(); i != patch_ports.end(); ++i) {