summaryrefslogtreecommitdiffstats
path: root/src/progs/ingenuity
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2006-12-12 23:30:38 +0000
committerDavid Robillard <d@drobilla.net>2006-12-12 23:30:38 +0000
commitf63c29df622dd4f4fde6de3906ec53765117fb79 (patch)
tree7e0731aa77fb3629ec9b517757135919c7e99b9f /src/progs/ingenuity
parent71f632d459471c2e75ed04b808df9671539a182c (diff)
downloadingen-f63c29df622dd4f4fde6de3906ec53765117fb79.tar.gz
ingen-f63c29df622dd4f4fde6de3906ec53765117fb79.tar.bz2
ingen-f63c29df622dd4f4fde6de3906ec53765117fb79.zip
Loading subpatches (ie not just into root).
Initial patch metadata. Subpatch browsing (via double clicking modules). git-svn-id: http://svn.drobilla.net/lad/ingen@218 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/progs/ingenuity')
-rw-r--r--src/progs/ingenuity/NodeModule.cpp10
-rw-r--r--src/progs/ingenuity/PatchPortModule.cpp8
-rw-r--r--src/progs/ingenuity/ThreadedLoader.cpp4
3 files changed, 14 insertions, 8 deletions
diff --git a/src/progs/ingenuity/NodeModule.cpp b/src/progs/ingenuity/NodeModule.cpp
index 73b87b5b..bec6e89c 100644
--- a/src/progs/ingenuity/NodeModule.cpp
+++ b/src/progs/ingenuity/NodeModule.cpp
@@ -27,6 +27,7 @@
#include "RenameWindow.h"
#include "PatchWindow.h"
#include "WindowFactory.h"
+#include "SubpatchModule.h"
namespace Ingenuity {
@@ -51,8 +52,13 @@ NodeModule::NodeModule(boost::shared_ptr<PatchCanvas> canvas, SharedPtr<NodeMode
boost::shared_ptr<NodeModule>
NodeModule::create(boost::shared_ptr<PatchCanvas> canvas, SharedPtr<NodeModel> node)
{
- boost::shared_ptr<NodeModule> ret = boost::shared_ptr<NodeModule>(
- new NodeModule(canvas, node));
+ boost::shared_ptr<NodeModule> ret;
+
+ SharedPtr<PatchModel> patch = PtrCast<PatchModel>(node);
+ if (patch)
+ ret = boost::shared_ptr<NodeModule>(new SubpatchModule(canvas, patch));
+ else
+ ret = boost::shared_ptr<NodeModule>(new NodeModule(canvas, node));
for (MetadataMap::const_iterator m = node->metadata().begin(); m != node->metadata().end(); ++m)
ret->metadata_update(m->first, m->second);
diff --git a/src/progs/ingenuity/PatchPortModule.cpp b/src/progs/ingenuity/PatchPortModule.cpp
index 315aacab..e1fb37a8 100644
--- a/src/progs/ingenuity/PatchPortModule.cpp
+++ b/src/progs/ingenuity/PatchPortModule.cpp
@@ -68,13 +68,13 @@ PatchPortModule::create(boost::shared_ptr<PatchCanvas> canvas, SharedPtr<PortMod
new PatchPortModule(canvas, port));
assert(ret);
- for (MetadataMap::const_iterator m = port->metadata().begin(); m != port->metadata().end(); ++m)
- ret->metadata_update(m->first, m->second);
-
- ret->m_patch_port = boost::shared_ptr<Port>(new Port(ret->shared_from_this(), port, true));
+ ret->m_patch_port = boost::shared_ptr<Port>(new Port(ret, port, true));
ret->add_port(ret->m_patch_port);
ret->resize();
+
+ for (MetadataMap::const_iterator m = port->metadata().begin(); m != port->metadata().end(); ++m)
+ ret->metadata_update(m->first, m->second);
return ret;
}
diff --git a/src/progs/ingenuity/ThreadedLoader.cpp b/src/progs/ingenuity/ThreadedLoader.cpp
index fbd64d3d..a3920665 100644
--- a/src/progs/ingenuity/ThreadedLoader.cpp
+++ b/src/progs/ingenuity/ThreadedLoader.cpp
@@ -73,9 +73,9 @@ ThreadedLoader::load_patch(bool merge,
cerr << "FIXME: load under root only\n";
- _events.push_back(sigc::bind(
+ _events.push_back(sigc::hide_return(sigc::bind(
sigc::mem_fun(_loader, &Loader::load),
- data_base_uri, "/"));
+ data_base_uri, "/", "", engine_data)));
_mutex.unlock();