ui: bug fixes in smart search box

* hide completer when elements are updated
* show correct indices in sub query search
* move query elements forward when the cursor is at the end of the box
This commit is contained in:
Eberhard Graether
2014-11-03 16:16:35 +01:00
parent e972dbe098
commit 38d9ec07a5
3 changed files with 51 additions and 14 deletions
+8
View File
@@ -169,10 +169,18 @@ SearchMatch SearchNode::fuzzyMatchData(const std::string& query, const SearchNod
size_t pos = 0;
size_t size = 0;
const SearchNode* root = parent;
std::deque<const SearchNode*> nodes = getNodesToParent(parent);
if (!nodes.size())
{
nodes.push_back(this);
root = root->getParent();
}
while (root && root->getNameId())
{
size += root->getName().size() + SearchIndex::DELIMITER.size();
root = root->getParent();
}
for (const SearchNode* node : nodes)