Skip to content

Commit

Permalink
Fixes for Layout/Overlay path resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Feb 10, 2017
1 parent 19a7187 commit 8c3025e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions holoviews/core/layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,14 +338,14 @@ def new_path(cls, path, item, paths, counts):
path = path[:2]
pl = len(path)
count = counts[path[:-1]]
counts[path[:-1]] += 1
if (pl == 1 and not item.label) or (pl == 2 and item.label):
new_path = path + (int_to_roman(count-1),)
if path in paths:
paths[paths.index(path)] = new_path
path = path + (int_to_roman(count),)
else:
path = path[:-1] + (int_to_roman(count),)
counts[path[:-1]] += 1
return path


Expand Down Expand Up @@ -374,10 +374,10 @@ def _unpack_paths(cls, objs, paths, items, counts):
Recursively unpacks lists and Layout-like objects, accumulating
into the supplied list of items.
"""
if isinstance(objs, cls):
if type(objs) is cls:
objs = objs.values()
for v in objs:
if isinstance(v, cls):
if type(v) is cls:
cls._unpack_paths(v, paths, items, counts)
continue
group = group_sanitizer(v.group)
Expand Down

0 comments on commit 8c3025e

Please sign in to comment.