summaryrefslogtreecommitdiffstats
path: root/src/progs
diff options
context:
space:
mode:
Diffstat (limited to 'src/progs')
-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();