Noticed a bug in categories tree while adding searched hierarchy tests.
With the following hierarchy:
- category1
- element1
- category2
- element1_1 (model is modeled element)
- element1_2 (model is modeled element)
and search paths: [[category1, element1, element1SubModel, category2, element1_1]],
switching category1 visibility, results in it having partial visibility, even though it should be visible.
This happens because when checking category1 elements (in this case element1) visibility, visibility of models that are elements is also checked (and while checking these sub-models visibility handler does not take into account search paths).
It should be enough to fix this by:
- Modify
BaseIdsCache.getCategories to accept search paths, and then filter out categories based on search paths
- Modify
BaseIdsCache.getElementsCount to accept search paths, and then return correct count for categories based on it's search paths.
It should be noted that additional tests for searched hierarchy should be added that check searched and non searched categories that are under sub-models.
Noticed a bug in categories tree while adding searched hierarchy tests.
With the following hierarchy:
and search paths: [[category1, element1, element1SubModel, category2, element1_1]],
switching
category1visibility, results in it havingpartialvisibility, even though it should bevisible.This happens because when checking
category1elements (in this caseelement1) visibility, visibility of models that are elements is also checked (and while checking these sub-models visibility handler does not take into account search paths).It should be enough to fix this by:
BaseIdsCache.getCategoriesto accept search paths, and then filter out categories based on search pathsBaseIdsCache.getElementsCountto accept search paths, and then return correct count for categories based on it's search paths.It should be noted that additional tests for searched hierarchy should be added that check searched and non searched categories that are under sub-models.