nodes: use flag instead of hidden array in factory

This commit is contained in:
itsmattkc
2022-05-09 08:44:39 -07:00
parent c25960e5af
commit 13aedfa294
6 changed files with 9 additions and 10 deletions
+2 -7
View File
@@ -65,8 +65,8 @@
#include "time/timeremap/timeremap.h"
namespace olive {
QList<Node*> NodeFactory::library_;
QVector<int> NodeFactory::hidden_;
void NodeFactory::Initialize()
{
@@ -78,10 +78,6 @@ void NodeFactory::Initialize()
library_.append(created_node);
}
hidden_.append(kTextGeneratorV1);
hidden_.append(kTextGeneratorV2);
hidden_.append(kGroupNode);
}
void NodeFactory::Destroy()
@@ -107,8 +103,7 @@ Menu *NodeFactory::CreateMenu(QWidget* parent, bool create_none_item, Node::Cate
continue;
}
if (hidden_.contains(i)) {
// Skip this node
if (n->GetFlags() & Node::kDontShowInCreateMenu) {
continue;
}