diff options
author | David Robillard <d@drobilla.net> | 2006-09-09 21:42:33 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2006-09-09 21:42:33 +0000 |
commit | a90181962d3f9eca3e00f665465bbd66bdd79927 (patch) | |
tree | bcebc1dc25b788cbd647f70068cd6d1ff40ac722 /src/progs/ingenuity/PatchTreeWindow.cpp | |
parent | fca95e5d454d37bd74b98f5bce35cfcbaee86c3f (diff) | |
download | ingen-a90181962d3f9eca3e00f665465bbd66bdd79927.tar.gz ingen-a90181962d3f9eca3e00f665465bbd66bdd79927.tar.bz2 ingen-a90181962d3f9eca3e00f665465bbd66bdd79927.zip |
Canvas cleanups, bugfixes, more robustness, etc.
git-svn-id: http://svn.drobilla.net/lad/ingen@124 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/progs/ingenuity/PatchTreeWindow.cpp')
-rw-r--r-- | src/progs/ingenuity/PatchTreeWindow.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/progs/ingenuity/PatchTreeWindow.cpp b/src/progs/ingenuity/PatchTreeWindow.cpp index 47bfc485..0f8c947a 100644 --- a/src/progs/ingenuity/PatchTreeWindow.cpp +++ b/src/progs/ingenuity/PatchTreeWindow.cpp @@ -20,6 +20,7 @@ #include "PatchTreeWindow.h" #include "PatchController.h" #include "PatchWindow.h" +#include "Store.h" #include "SubpatchModule.h" #include "PatchModel.h" #include "util/Path.h" @@ -64,6 +65,22 @@ PatchTreeWindow::PatchTreeWindow(BaseObjectType* cobject, void +PatchTreeWindow::init(Store& store) +{ + store.new_object_sig.connect(sigc::mem_fun(this, &PatchTreeWindow::new_object)); +} + + +void +PatchTreeWindow::new_object(CountedPtr<ObjectModel> object) +{ + CountedPtr<PatchModel> patch = object; + if (patch && dynamic_cast<PatchController*>(patch->controller())) + add_patch(dynamic_cast<PatchController*>(patch->controller())); +} + + +void PatchTreeWindow::add_patch(PatchController* pc) { const CountedPtr<PatchModel> pm = pc->patch_model(); |