From a90181962d3f9eca3e00f665465bbd66bdd79927 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 9 Sep 2006 21:42:33 +0000 Subject: Canvas cleanups, bugfixes, more robustness, etc. git-svn-id: http://svn.drobilla.net/lad/ingen@124 a436a847-0d15-0410-975c-d299462d15a1 --- src/progs/ingenuity/PatchTreeWindow.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/progs/ingenuity/PatchTreeWindow.cpp') 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" @@ -63,6 +64,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 object) +{ + CountedPtr patch = object; + if (patch && dynamic_cast(patch->controller())) + add_patch(dynamic_cast(patch->controller())); +} + + void PatchTreeWindow::add_patch(PatchController* pc) { -- cgit v1.2.1