Fix disabled move and indent buttons for the WBS tree manipulation
These icons are disabled when the WBS is showed filtered, as the manipulation operations could be ambiguous or problematic, but it was treating wrongly empty predicates. FEA: ItEr77S15FilteringEnhancements
This commit is contained in:
parent
3ad35624a2
commit
cabf12ad8f
2 changed files with 7 additions and 1 deletions
|
|
@ -67,6 +67,11 @@ public class OrderElementPredicate implements IPredicate {
|
|||
return accepts(orderElement) || accepts(orderElement.getAllChildren());
|
||||
}
|
||||
|
||||
public boolean isEmpty() {
|
||||
return (filters.isEmpty() && startDate == null && finishDate == null && name
|
||||
.isEmpty());
|
||||
}
|
||||
|
||||
private boolean accepts(OrderElement orderElement) {
|
||||
if (orderElement == null) {
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -602,7 +602,8 @@ public class OrderElementTreeController extends TreeController<OrderElement> {
|
|||
|
||||
@Override
|
||||
protected boolean isPredicateApplied() {
|
||||
return predicate != null;
|
||||
return (predicate != null)
|
||||
&& !((OrderElementPredicate) predicate).isEmpty();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue