diff --git a/app/common/debug.cpp b/app/common/debug.cpp index c132b48ee..c289c2f7c 100644 --- a/app/common/debug.cpp +++ b/app/common/debug.cpp @@ -45,7 +45,8 @@ void DebugHandler(QtMsgType type, const QMessageLogContext &context, const QStri break; } - fprintf(stderr, "[%s] %s (%s:%u)\n", msg_type, localMsg.constData(), context.function, context.line); + //fprintf(stderr, "[%s] %s (%s:%u)\n", msg_type, localMsg.constData(), context.function, context.line); + fprintf(stderr, "[%s] %s\n", msg_type, localMsg.constData()); #ifdef Q_OS_WINDOWS // Windows still seems to buffer stderr and we want to see debug messages immediately, so here we make sure each line diff --git a/app/config/config.cpp b/app/config/config.cpp index 192fcdb74..82d358a28 100644 --- a/app/config/config.cpp +++ b/app/config/config.cpp @@ -91,7 +91,7 @@ void Config::SetDefaults() SetEntryInternal(QStringLiteral("Autoscroll"), NodeValue::kInt, AutoScroll::kPage); SetEntryInternal(QStringLiteral("AutoSelectDivider"), NodeValue::kBoolean, true); SetEntryInternal(QStringLiteral("SetNameWithMarker"), NodeValue::kBoolean, false); - SetEntryInternal(QStringLiteral("RectifiedWaveforms"), NodeValue::kBoolean, false); + SetEntryInternal(QStringLiteral("RectifiedWaveforms"), NodeValue::kBoolean, true); SetEntryInternal(QStringLiteral("DropWithoutSequenceBehavior"), NodeValue::kInt, ImportTool::kDWSAsk); SetEntryInternal(QStringLiteral("Loop"), NodeValue::kBoolean, false); SetEntryInternal(QStringLiteral("SplitClipsCopyNodes"), NodeValue::kBoolean, true); diff --git a/app/node/project/folder/folder.cpp b/app/node/project/folder/folder.cpp index 4bcd7cabc..d39c2e9e5 100644 --- a/app/node/project/folder/folder.cpp +++ b/app/node/project/folder/folder.cpp @@ -49,28 +49,26 @@ void Folder::Retranslate() SetInputName(kChildInput, tr("Children")); } -bool ChildExistsWithNameInternal(const Folder* n, const QString& s) +Node *GetChildWithNameInternal(const Folder* n, const QString& s) { for (int i=0; iitem_child_count(); i++) { Node* child = n->item_child(i); if (child->GetLabel() == s) { - return true; - } else { - Folder* subfolder = dynamic_cast(child); - - if (subfolder && ChildExistsWithNameInternal(subfolder, s)) { - return true; + return child; + } else if (Folder* subfolder = dynamic_cast(child)) { + if (Node *n2 = GetChildWithNameInternal(subfolder, s)) { + return n2; } } } - return false; + return nullptr; } -bool Folder::ChildExistsWithName(const QString &s) const +Node *Folder::GetChildWithName(const QString &s) const { - return ChildExistsWithNameInternal(this, s); + return GetChildWithNameInternal(this, s); } bool Folder::HasChildRecursive(Node *child) const diff --git a/app/node/project/folder/folder.h b/app/node/project/folder/folder.h index 22d25f110..2afb0ac1c 100644 --- a/app/node/project/folder/folder.h +++ b/app/node/project/folder/folder.h @@ -63,7 +63,11 @@ public: virtual void Retranslate() override; - bool ChildExistsWithName(const QString& s) const; + Node *GetChildWithName(const QString& s) const; + bool ChildExistsWithName(const QString& s) const + { + return GetChildWithName(s); + } bool HasChildRecursive(Node *child) const;