folder: fixed bug in "ChildExistsWithName"
Fixes bug where sequence auto-naming would fail.
This commit is contained in:
@@ -50,13 +50,13 @@ void Folder::Retranslate()
|
|||||||
|
|
||||||
bool ChildExistsWithNameInternal(const Folder* n, const QString& s)
|
bool ChildExistsWithNameInternal(const Folder* n, const QString& s)
|
||||||
{
|
{
|
||||||
foreach (const Node::OutputConnection& c, n->output_connections()) {
|
for (int i=0; i<n->item_child_count(); i++) {
|
||||||
Node* connected = c.second.node();
|
Node* child = n->item_child(i);
|
||||||
|
|
||||||
if (connected->GetLabel() == s) {
|
if (child->GetLabel() == s) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
Folder* subfolder = dynamic_cast<Folder*>(connected);
|
Folder* subfolder = dynamic_cast<Folder*>(child);
|
||||||
|
|
||||||
if (subfolder && ChildExistsWithNameInternal(subfolder, s)) {
|
if (subfolder && ChildExistsWithNameInternal(subfolder, s)) {
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user