From ab2aa4d4922ab1a62b7a43013d09b2d9d144b3c5 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 15 Aug 2008 23:34:41 +0000 Subject: Push serialiser down into core ('world'). HTTP access to patches (serialised on demand). git-svn-id: http://svn.drobilla.net/lad/ingen@1393 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/client/PatchModel.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/libs/client/PatchModel.cpp') diff --git a/src/libs/client/PatchModel.cpp b/src/libs/client/PatchModel.cpp index b47bd4f4..7f928b41 100644 --- a/src/libs/client/PatchModel.cpp +++ b/src/libs/client/PatchModel.cpp @@ -189,7 +189,9 @@ PatchModel::polyphonic() const unsigned -PatchModel::child_name_offset(const string& base_name) const +PatchModel::child_name_offset(ClientStore& store, + SharedPtr parent, + const string& base_name) { assert(Path::is_valid_name(base_name)); unsigned offset = 0; @@ -199,7 +201,7 @@ PatchModel::child_name_offset(const string& base_name) const ss << base_name; if (offset > 0) ss << "_" << offset; - if (!find_child(ss.str())) + if (store.find(parent->path().base() + ss.str()) == store.objects().end()) break; else if (offset == 0) offset = 2; -- cgit v1.2.1