ui: Fixed undo to now undefined node didn't display it undefined

This commit is contained in:
Eberhard Graether
2018-10-19 21:26:47 +02:00
parent adc1900d18
commit 684699ace9
2 changed files with 14 additions and 3 deletions
@@ -481,9 +481,20 @@ void UndoRedoController::replayCommand(std::list<Command>::iterator it)
if (!msg->isEdge && !msg->isAggregation)
{
for (SearchMatch& match : msg->getSearchMatches())
std::vector<SearchMatch> matches = msg->getSearchMatches();
msg->searchMatches.clear();
msg->tokenIds.clear();
for (SearchMatch match : matches)
{
match.tokenIds = m_storageAccess->getNodeIdsForNameHierarchies(match.tokenNames);
if (!match.tokenIds.size())
{
match.nodeType = NodeType::NODE_SYMBOL;
}
utility::append(msg->tokenIds, match.tokenIds);
msg->searchMatches.push_back(match);
}
}
}