logic: removed FilterUndefinedNodesFromGraph setting
because it is confusing and not necessary anymore since we have bundled nodes.
This commit is contained in:
@@ -9,8 +9,6 @@
|
|||||||
<config>
|
<config>
|
||||||
<StartupProject><!-- STRING: path to project settings xml file --></StartupProject>
|
<StartupProject><!-- STRING: path to project settings xml file --></StartupProject>
|
||||||
|
|
||||||
<FilterUndefinedNodesFromGraph><!-- BOOL: filter out undefined nodes in graph --></FilterUndefinedNodesFromGraph>
|
|
||||||
|
|
||||||
<source>
|
<source>
|
||||||
<CompilerFlags>
|
<CompilerFlags>
|
||||||
<CompilerFlag><!-- STRING: compiler flag, including the dash e.g. -v --></CompilerFlag>
|
<CompilerFlag><!-- STRING: compiler flag, including the dash e.g. -v --></CompilerFlag>
|
||||||
|
|||||||
@@ -867,32 +867,6 @@ std::shared_ptr<Graph> Storage::getGraphForActiveTokenIds(const std::vector<Id>&
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ApplicationSettings::getInstance()->filterUndefinedNodesFromGraph())
|
|
||||||
{
|
|
||||||
bool allUndefined = true;
|
|
||||||
Node::NodeTypeMask undefinedMask =
|
|
||||||
Node::NODE_UNDEFINED | Node::NODE_UNDEFINED_TYPE |
|
|
||||||
Node::NODE_UNDEFINED_VARIABLE | Node::NODE_UNDEFINED_FUNCTION;
|
|
||||||
for (Id tokenId : tokenIds)
|
|
||||||
{
|
|
||||||
Token* token = m_graph.getTokenById(tokenId);
|
|
||||||
if (token && token->isNode() && !dynamic_cast<Node*>(token)->isType(undefinedMask))
|
|
||||||
{
|
|
||||||
allUndefined = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!allUndefined)
|
|
||||||
{
|
|
||||||
QueryTree tree("!'undefined'");
|
|
||||||
std::shared_ptr<Graph> outGraph = std::make_shared<Graph>();
|
|
||||||
|
|
||||||
GraphFilterConductor().filter(&tree, graph.get(), outGraph.get());
|
|
||||||
return outGraph;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return graph;
|
return graph;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,11 +21,6 @@ std::string ApplicationSettings::getStartupProjectFilePath() const
|
|||||||
return getValue<std::string>("StartupProject", "");
|
return getValue<std::string>("StartupProject", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ApplicationSettings::filterUndefinedNodesFromGraph() const
|
|
||||||
{
|
|
||||||
return getValue<bool>("FilterUndefinedNodesFromGraph", false);
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string ApplicationSettings::getFontName() const
|
std::string ApplicationSettings::getFontName() const
|
||||||
{
|
{
|
||||||
return getValue<std::string>("application/font_name", "Source Code Pro");
|
return getValue<std::string>("application/font_name", "Source Code Pro");
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ public:
|
|||||||
~ApplicationSettings();
|
~ApplicationSettings();
|
||||||
|
|
||||||
std::string getStartupProjectFilePath() const;
|
std::string getStartupProjectFilePath() const;
|
||||||
bool filterUndefinedNodesFromGraph() const;
|
|
||||||
|
|
||||||
// application
|
// application
|
||||||
std::string getFontName() const;
|
std::string getFontName() const;
|
||||||
|
|||||||
Reference in New Issue
Block a user