From eae3b1c1e100fc1b705a2d664cffae4aa5802568 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 28 May 2009 15:18:51 +0000 Subject: 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 --- src/gui/NodeModule.cpp | 1 + src/serialisation/Parser.cpp | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'src') 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) { -- cgit v1.2.1