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:
@@ -1,5 +1,27 @@
|
||||
#include "data/access/StorageAccess.h"
|
||||
|
||||
StorageAccess::~StorageAccess()
|
||||
std::pair<std::vector<Id>, std::vector<SearchMatch>> StorageAccess::getNodeIdsAndSearchMatchesForNameHierarchies(
|
||||
const std::vector<NameHierarchy> nameHierarchies) const
|
||||
{
|
||||
std::vector<Id> tokenIds = getNodeIdsForNameHierarchies(nameHierarchies);
|
||||
std::vector<SearchMatch> matches;
|
||||
|
||||
if (tokenIds.size())
|
||||
{
|
||||
matches = getSearchMatchesForTokenIds(tokenIds);
|
||||
}
|
||||
else
|
||||
{
|
||||
for (const NameHierarchy& name : nameHierarchies)
|
||||
{
|
||||
matches.push_back(SearchMatch(name.getQualifiedName()));
|
||||
}
|
||||
|
||||
if (!matches.size())
|
||||
{
|
||||
matches.push_back(SearchMatch(L"<invalid>"));
|
||||
}
|
||||
}
|
||||
|
||||
return std::make_pair(tokenIds, matches);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user