From 6b18de71d1c603255b263a64434005306f152f13 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 19 Feb 2011 05:10:29 +0000 Subject: Save/load patches as nested bundles (fix ticket #520). Sane (context-based, ala RDF quads) approach to the problem of externally visible / internally visible properties. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2993 a436a847-0d15-0410-975c-d299462d15a1 --- src/gui/NewSubpatchWindow.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/gui/NewSubpatchWindow.cpp') diff --git a/src/gui/NewSubpatchWindow.cpp b/src/gui/NewSubpatchWindow.cpp index 44fb54b0..13ea0c47 100644 --- a/src/gui/NewSubpatchWindow.cpp +++ b/src/gui/NewSubpatchWindow.cpp @@ -96,14 +96,17 @@ NewSubpatchWindow::ok_clicked() const Path path = _patch->path().base() + Path::nameify(_name_entry->get_text()); const uint32_t poly = _poly_spinbutton->get_value_as_int(); + // Create patch Resource::Properties props; props.insert(make_pair(app.uris().rdf_type, app.uris().ingen_Patch)); props.insert(make_pair(app.uris().ingen_polyphony, Atom(int32_t(poly)))); - app.engine()->put(ResourceImpl::meta_uri(path), props); + props.insert(make_pair(app.uris().ingen_enabled, Atom(bool(true)))); + app.engine()->put(path, props, Resource::INTERNAL); + // Set external (node perspective) properties props = _initial_data; - props.insert(make_pair(app.uris().ingen_enabled, bool(true))); - app.engine()->put(path, props); + props.insert(make_pair(app.uris().rdf_type, app.uris().ingen_Patch)); + app.engine()->put(path, _initial_data, Resource::EXTERNAL); hide(); } -- cgit v1.2.1