From b137b8e0ac8172d31cbc086cc0dc984ffa4bcbf0 Mon Sep 17 00:00:00 2001 From: itsmattkc Date: Thu, 25 Mar 2021 16:54:01 +1100 Subject: [PATCH] folder: fixed bug in "ChildExistsWithName" Fixes bug where sequence auto-naming would fail. --- app/project/item/folder/folder.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/project/item/folder/folder.cpp b/app/project/item/folder/folder.cpp index cdb36801e..d94f6fe12 100644 --- a/app/project/item/folder/folder.cpp +++ b/app/project/item/folder/folder.cpp @@ -50,13 +50,13 @@ void Folder::Retranslate() bool ChildExistsWithNameInternal(const Folder* n, const QString& s) { - foreach (const Node::OutputConnection& c, n->output_connections()) { - Node* connected = c.second.node(); + for (int i=0; iitem_child_count(); i++) { + Node* child = n->item_child(i); - if (connected->GetLabel() == s) { + if (child->GetLabel() == s) { return true; } else { - Folder* subfolder = dynamic_cast(connected); + Folder* subfolder = dynamic_cast(child); if (subfolder && ChildExistsWithNameInternal(subfolder, s)) { return true;