ui: node type keywords to filter autocompletions or activate all nodes (issue #78)
* Fix history stack activating wrong symbol when aggregation was clicked
This commit is contained in:
@@ -73,6 +73,20 @@ std::string Node::getReadableTypeString(NodeType type)
|
||||
return "";
|
||||
}
|
||||
|
||||
Node::NodeType Node::getTypeForReadableTypeString(const std::string str)
|
||||
{
|
||||
for (Node::NodeTypeMask mask = 1; mask <= NODE_MAX_VALUE; mask *= 2)
|
||||
{
|
||||
Node::NodeType type = intToType(mask);
|
||||
if (getReadableTypeString(type) == str)
|
||||
{
|
||||
return type;
|
||||
}
|
||||
}
|
||||
|
||||
return NODE_NON_INDEXED;
|
||||
}
|
||||
|
||||
int Node::typeToInt(NodeType type)
|
||||
{
|
||||
return type;
|
||||
|
||||
@@ -46,11 +46,14 @@ public:
|
||||
|
||||
NODE_FILE = 0x20000,
|
||||
NODE_MACRO = 0x40000,
|
||||
NODE_UNION = 0x80000
|
||||
NODE_UNION = 0x80000,
|
||||
|
||||
NODE_MAX_VALUE = NODE_UNION
|
||||
};
|
||||
|
||||
static std::string getUnderscoredTypeString(NodeType type);
|
||||
static std::string getReadableTypeString(NodeType type);
|
||||
static Node::NodeType getTypeForReadableTypeString(const std::string str);
|
||||
|
||||
static int typeToInt(NodeType type);
|
||||
static NodeType intToType(int value);
|
||||
|
||||
Reference in New Issue
Block a user