ui: sorting search results
* search results are sorted by: score > length > name * fixed crash that occurred when trying to get a node by id with id == 0
This commit is contained in:
@@ -422,7 +422,7 @@ StorageNode SqliteStorage::getNodeById(Id id) const
|
||||
{
|
||||
return getFirstNode("WHERE id == " + std::to_string(id));
|
||||
}
|
||||
return StorageNode(0, 0, 0, definitionTypeToInt(DEFINITION_NONE));
|
||||
return StorageNode(0, 0, "", definitionTypeToInt(DEFINITION_NONE));
|
||||
}
|
||||
|
||||
StorageNode SqliteStorage::getNodeBySerializedName(const std::string& serializedName) const
|
||||
|
||||
Reference in New Issue
Block a user