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 showParent mode
  • Loading branch information
Дмитрий Ефимов committed Oct 31, 2017
1 parent d5a55ae commit 7398a74
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,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 @@ -319,6 +321,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
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ It aims to leverage mature but now discontinued JPivot project's codebase to mak
<repository>
<id>pentaho</id>
<name>Pentaho Repository</name>
<url>http://repository.pentaho.org/artifactory/repo/</url>
<url>https://public.nexus.pentaho.org/content/repositories/omni/</url>
</repository>
</repositories>

Expand Down

0 comments on commit 7398a74

Please sign in to comment.