From af759288a2517f9acf4c28f79d9c43be0086a221 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 18 Aug 2008 03:49:35 +0000 Subject: More copy/paste and serialisation work. Don't die on invalid path for set_property and set_variable (return error to client). Working paste to subpatches, paste of connected patch ports and modules. git-svn-id: http://svn.drobilla.net/lad/ingen@1428 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/shared/Store.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/libs/shared/Store.cpp') diff --git a/src/libs/shared/Store.cpp b/src/libs/shared/Store.cpp index fea18b6d..9f0f3624 100644 --- a/src/libs/shared/Store.cpp +++ b/src/libs/shared/Store.cpp @@ -82,7 +82,8 @@ Store::find_child(SharedPtr parent, const string& child_nam unsigned Store::child_name_offset(const Raul::Path& parent, - const Raul::Symbol& symbol) + const Raul::Symbol& symbol, + bool allow_zero) { unsigned offset = 0; @@ -91,7 +92,7 @@ Store::child_name_offset(const Raul::Path& parent, ss << symbol; if (offset > 0) ss << "_" << offset; - if (find(parent.base() + ss.str()) == end()) + if (find(parent.base() + ss.str()) == end() && (allow_zero || offset > 0)) break; else if (offset == 0) offset = 2; -- cgit v1.2.1