Skip to content

Commit

Permalink
Merge pull request #18 from SciTools-incubator/AddSelectorNames
Browse files Browse the repository at this point in the history
Bugfix, image dicts without names causes problem
  • Loading branch information
Malcolm Brooks authored Sep 27, 2016
2 parents 10c7d77 + a5f5b39 commit 8886ca8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/ImageMetaTag/webpage.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,13 @@ def write_full_page(img_dict, filepath, title, page_filename=None, tab_s_name=No
url_separator='|', url_type=url_type)
# now write out the end, which includes the placeholders for the actual
# stuff that appears on the page:
# (if show_selector_names is False, then the input level_names list is empty):
if show_selector_names:
level_names = img_dict.level_names
else:
level_names = False
write_js_placeholders(file_obj=out_file, dict_depth=img_dict.dict_depth(),
style='horiz dropdowns',
level_names=show_selector_names * img_dict.level_names)
level_names=level_names)

if not postamble is None:
out_file.write(postamble)
Expand Down

0 comments on commit 8886ca8

Please sign in to comment.