summaryrefslogtreecommitdiffstats
path: root/src/progs/ingenuity/NodeModule.cpp
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/NodeModule.cpp
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/NodeModule.cpp')
-rw-r--r--src/progs/ingenuity/NodeModule.cpp10
1 files changed, 8 insertions, 2 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);