[log] Fix DelegateGraphFacade when applying filters.

This commit is contained in:
Erokhin Stanislav
2014-05-22 19:32:46 +04:00
parent 56c0dd049b
commit e3177e86f4
@@ -190,18 +190,25 @@ public class DelegateGraphFacade implements GraphFacade {
@Override
public void setVisibleBranches(@Nullable Collection<Integer> heads) {
if (heads == null)
boolean needUpdate;
if (heads == null) {
needUpdate = myHeads != null;
myHeads = null;
else
} else {
needUpdate = true;
myHeads = new HashSet<Integer>(heads);
updateVisibleGraph();
}
if (needUpdate)
updateVisibleGraph();
}
@Override
public void setFilter(@Nullable Condition<Integer> visibilityPredicate) {
boolean needUpdate = !(visibilityPredicate == myVisibilityPredicate);
myVisibilityPredicate = visibilityPredicate;
updateVisibleGraph();
if (needUpdate)
updateVisibleGraph();
}
@Override