ui: Fixed activating history item from menu showed wrong symbol (issue #572)

* Refactored SearchMatch: removed delimiter, added tokenName
* Refactored MessageActivateTokens: removed tokenNames
* Restore from SearchMatches from NameHierarchies of tokens
This commit is contained in:
Eberhard Graether
2018-06-30 02:16:03 +02:00
parent 84ddb4ba21
commit 6794b61fab
18 changed files with 115 additions and 104 deletions
@@ -235,9 +235,7 @@ void UndoRedoController::handleMessage(MessageRefresh* message)
if (m_iterator == m_list.begin())
{
SearchMatch match = SearchMatch::createCommand(SearchMatch::COMMAND_ALL);
MessageSearch msg(std::vector<SearchMatch>(1, match));
msg.dispatch();
MessageSearch({ SearchMatch::createCommand(SearchMatch::COMMAND_ALL) }).dispatch();
}
else
{
@@ -461,8 +459,11 @@ void UndoRedoController::replayCommand(std::list<Command>::iterator it)
if (!msg->isEdge && !msg->isAggregation)
{
msg->tokenIds = m_storageAccess->getNodeIdsForNameHierarchies(msg->tokenNames);
msg->searchMatches = m_storageAccess->getSearchMatchesForTokenIds(msg->tokenIds);
std::pair<std::vector<Id>, std::vector<SearchMatch>> ret =
m_storageAccess->getNodeIdsAndSearchMatchesForNameHierarchies(msg->getTokenNamesOfMatches());
msg->tokenIds = ret.first;
msg->searchMatches = ret.second;
}
}