From a100c20612fc4f7f30372f579e355f782befa7e2 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 14 Sep 2006 06:30:26 +0000 Subject: Bug fixes. git-svn-id: http://svn.drobilla.net/lad/ingen@134 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/client/ModelEngineInterface.cpp | 8 ++++---- src/libs/client/ModelEngineInterface.h | 4 +++- src/libs/client/NodeModel.cpp | 3 +++ src/libs/client/PatchLibrarian.cpp | 6 ++++-- 4 files changed, 14 insertions(+), 7 deletions(-) (limited to 'src/libs/client') diff --git a/src/libs/client/ModelEngineInterface.cpp b/src/libs/client/ModelEngineInterface.cpp index 3add8854..40de205c 100644 --- a/src/libs/client/ModelEngineInterface.cpp +++ b/src/libs/client/ModelEngineInterface.cpp @@ -56,14 +56,14 @@ ModelEngineInterface::create_node_with_data(const string& plugin_uri, /** Create a patch. */ void -ModelEngineInterface::create_patch_from_model(const PatchModel* pm) +ModelEngineInterface::create_patch_with_data(const Path& path, size_t poly, const MetadataMap& data) { - create_patch(pm->path().c_str(), pm->poly()); - set_metadata_map(pm->path(), pm->metadata()); + create_patch(path, poly); + set_metadata_map(path, data); } -/** Set all pieces of metadata in a model. +/** Set all pieces of metadata in a map. */ void ModelEngineInterface::set_metadata_map(const Path& subject, const MetadataMap& data) diff --git a/src/libs/client/ModelEngineInterface.h b/src/libs/client/ModelEngineInterface.h index 7bc65d1a..e97947a3 100644 --- a/src/libs/client/ModelEngineInterface.h +++ b/src/libs/client/ModelEngineInterface.h @@ -44,7 +44,9 @@ class ModelEngineInterface : public virtual Shared::EngineInterface public: virtual ~ModelEngineInterface() {} - virtual void create_patch_from_model(const PatchModel* pm); + virtual void create_patch_with_data(const Path& path, + size_t poly, + const MetadataMap& initial_data); virtual void create_node_with_data(const string& plugin_uri, const Path& path, diff --git a/src/libs/client/NodeModel.cpp b/src/libs/client/NodeModel.cpp index cb46bafc..c5e399d2 100644 --- a/src/libs/client/NodeModel.cpp +++ b/src/libs/client/NodeModel.cpp @@ -122,6 +122,9 @@ NodeModel::add_port(CountedPtr pm) // Store should have handled this by merging the two assert(existing == m_ports.end()); + + m_ports.push_back(pm); + new_port_sig.emit(pm); } diff --git a/src/libs/client/PatchLibrarian.cpp b/src/libs/client/PatchLibrarian.cpp index 9fc70ee7..ebc33f36 100644 --- a/src/libs/client/PatchLibrarian.cpp +++ b/src/libs/client/PatchLibrarian.cpp @@ -479,7 +479,8 @@ PatchLibrarian::load_patch(CountedPtr pm, bool wait, bool existing) if (wait) { //int id = _engine->get_next_request_id(); //_engine->set_wait_response_id(id); - _engine->create_patch_from_model(pm.get()); + cerr << "FIXME: create patch\n"; + //_engine->create_patch_from_model(pm.get()); //bool succeeded = _engine->wait_for_response(); // If creating the patch failed, bail out so we don't load all these nodes @@ -489,7 +490,8 @@ PatchLibrarian::load_patch(CountedPtr pm, bool wait, bool existing) return ""; }*/ // FIXME } else { - _engine->create_patch_from_model(pm.get()); + cerr << "FIXME: create patch (2)\n"; + //_engine->create_patch_from_model(pm.get()); } } -- cgit v1.2.1