Skip to content

Commit

Permalink
fixed mysticfall#226 Redundant property columns in parent-child level…
Browse files Browse the repository at this point in the history
… with show
  • Loading branch information
Judilson committed Jun 18, 2018
1 parent b016eb2 commit 9e7087a
Showing 1 changed file with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,9 @@ void addMemberProperties() {

List<TreeNode<TableAxisContext>> children = null;

if (getMember() != null) {
// Should render level properties only once behind the latest
if (getMember() != null && isLastInLevel()) {

List<Level> levels = getReference().getLevels(getHierarchy());

boolean showParent = getReference().getRenderer().getShowParentMembers();
Expand Down Expand Up @@ -315,6 +317,18 @@ void addMemberProperties() {
}
}

private boolean isLastInLevel() {
if (getChildCount() == 0) {
return true;
}

TableHeaderNode childNode = (TableHeaderNode) getChildren().get(0);
if (getMember().getLevel().getDepth() == childNode.getMember().getLevel().getDepth()) {
return !OlapUtils.equals(getHierarchy(), childNode.getHierarchy());
}
return true;
}

void mergeChildren() {
List<TreeNode<TableAxisContext>> children = new ArrayList<TreeNode<TableAxisContext>>(getChildren());

Expand Down

0 comments on commit 9e7087a

Please sign in to comment.