From 6808bf7bf9a36bdf2fea78ae5f94e2c3d698fdc9 Mon Sep 17 00:00:00 2001 From: William Moore Date: Sun, 10 May 2020 22:38:05 +0100 Subject: [PATCH] Only use visible scalebars in figure-info when showing lengths of scalebars in the info page --- omero_figure/scripts/omero/figure_scripts/Figure_To_Pdf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/omero_figure/scripts/omero/figure_scripts/Figure_To_Pdf.py b/omero_figure/scripts/omero/figure_scripts/Figure_To_Pdf.py index c0c070204..4daa1618d 100644 --- a/omero_figure/scripts/omero/figure_scripts/Figure_To_Pdf.py +++ b/omero_figure/scripts/omero/figure_scripts/Figure_To_Pdf.py @@ -1742,8 +1742,8 @@ def add_info_page(self, panels_json): for p in panels_json: iid = p['imageId'] # list unique scalebar lengths - if 'scalebar' in p: - sb_length = p['scalebar']['length'] + if 'scalebar' in p and p['scalebar'].get('show'): + sb_length = p['scalebar'].get('length') symbol = u"\u00B5m" if 'pixel_size_x_symbol' in p: symbol = p['pixel_size_x_symbol']