data: refactored file clearing on reparse to use TaskClearStorage

This commit is contained in:
Eberhard Graether
2015-10-01 13:45:31 +02:00
parent 5b47661a90
commit 8fa9bdde5e
23 changed files with 239 additions and 134 deletions
@@ -43,6 +43,12 @@ void GraphController::handleMessage(MessageActivateTokens* message)
m_activeEdgeIds.clear();
}
if (!m_activeNodeIds.size() && !m_activeEdgeIds.size())
{
clear();
return;
}
createDummyGraphForTokenIds(utility::concat(m_activeNodeIds, m_activeEdgeIds));
buildGraph(message);
@@ -133,6 +139,18 @@ GraphView* GraphController::getView() const
return Controller::getView<GraphView>();
}
void GraphController::clear()
{
m_dummyNodes.clear();
m_dummyEdges.clear();
m_activeNodeIds.clear();
m_activeEdgeIds.clear();
m_graph.reset();
getView()->clear();
}
void GraphController::createDummyGraphForTokenIds(const std::vector<Id>& tokenIds)
{
GraphView* view = getView();