node: split off traversing functions from renderer for usage elsewhere

Fixes issue where Viewer node wouldn't pick up correct length if a tracks
weren't in use.
This commit is contained in:
itsmattkc
2020-03-13 15:31:15 +11:00
parent 41da5dbd53
commit 9e4c79699e
18 changed files with 218 additions and 142 deletions
+2 -6
View File
@@ -58,13 +58,9 @@ NodeValueTable::NodeValueTable()
QVariant NodeValueTable::Get(const NodeParam::DataType &type, const QString &tag) const
{
int value_index = GetInternal(type, tag);
NodeValue v = GetWithMeta(type, tag);
if (value_index >= 0) {
return values_.at(value_index).data();
}
return QVariant();
return v.data();
}
NodeValue NodeValueTable::GetWithMeta(const NodeParam::DataType &type, const QString &tag) const