diff options
Diffstat (limited to 'src/libs/client/PatchModel.cpp')
-rw-r--r-- | src/libs/client/PatchModel.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
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<PatchModel> 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; |