From c7ebab1bda68e184ef9f7063b48fe2a65113b961 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 5 Oct 2007 04:44:54 +0000 Subject: Fix connection serialisation. Do hidden graphviz render to /dev/null instead of /home/dave/test.graphviz. Oops. :) git-svn-id: http://svn.drobilla.net/lad/ingen@823 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/client/Serializer.cpp | 38 ++++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 20 deletions(-) (limited to 'src/libs') diff --git a/src/libs/client/Serializer.cpp b/src/libs/client/Serializer.cpp index 1652e546..aaf9c955 100644 --- a/src/libs/client/Serializer.cpp +++ b/src/libs/client/Serializer.cpp @@ -16,38 +16,36 @@ */ #include -#include -#include -#include -#include -#include // pair, make_pair -#include #include #include #include // atof -#include #include +#include +#include #include -#include -#include -#include -#include +#include +#include +#include // pair, make_pair +#include #include #include +#include +#include +#include +#include #include #include "interface/EngineInterface.hpp" -#include "Serializer.hpp" -#include "PatchModel.hpp" -#include "NodeModel.hpp" #include "ConnectionModel.hpp" +#include "NodeModel.hpp" +#include "PatchModel.hpp" +#include "PluginModel.hpp" #include "PortModel.hpp" #include "PresetModel.hpp" -#include "PluginModel.hpp" +#include "Serializer.hpp" using namespace std; using namespace Raul; using namespace Raul::RDF; -using boost::optional; namespace Ingen { namespace Client { @@ -158,7 +156,6 @@ Serializer::path_to_node_id(const Path& path) Node id = _world.blank_id(); assert(id); _node_map[path] = id; - assert(_node_map[path]); return id; } } @@ -421,9 +418,10 @@ Serializer::serialize_connection(SharedPtr connection) throw (s if (!_model) throw std::logic_error("serialize_connection called without serialization in progress"); - _model->add_statement(path_to_node_id(connection->dst_port_path()), - "ingen:connectedTo", - path_to_node_id(connection->src_port_path())); + const Node src_node = path_to_node_id(connection->src_port_path()); + const Node dst_node = path_to_node_id(connection->dst_port_path()); + + _model->add_statement(dst_node, "ingen:connectedTo", src_node); } -- cgit v1.2.1