From abcc960e3a6a41973e8cd66fc528faf76745ffb8 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 5 Apr 2012 02:38:40 +0000 Subject: Fix subpatch creation (fix #826). git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4144 a436a847-0d15-0410-975c-d299462d15a1 --- src/gui/PatchBox.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/gui/PatchBox.cpp') diff --git a/src/gui/PatchBox.cpp b/src/gui/PatchBox.cpp index 61f2fb9f..11921fa6 100644 --- a/src/gui/PatchBox.cpp +++ b/src/gui/PatchBox.cpp @@ -198,7 +198,16 @@ PatchBox::init_box(App& app) void PatchBox::set_patch_from_path(const Raul::Path& path, SharedPtr view) { - std::cerr << "FIXME: Set patch from path" << std::endl; + if (view) { + assert(view->patch()->path() == path); + _app->window_factory()->present_patch(view->patch(), _window, view); + } else { + SharedPtr model = PtrCast( + _app->store()->object(path)); + if (model) { + _app->window_factory()->present_patch(model, _window); + } + } } /** Sets the patch for this box and initializes everything. -- cgit v1.2.1