From f928bc73ca499f3129be274dd9202770ce91e83b Mon Sep 17 00:00:00 2001 From: Daniel Rojas Date: Tue, 23 Mar 2021 11:50:02 +0100 Subject: [PATCH] Add BOM bubble cell to cables --- src/wireviz/Harness.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/wireviz/Harness.py b/src/wireviz/Harness.py index 3ad4ee0..c575f95 100644 --- a/src/wireviz/Harness.py +++ b/src/wireviz/Harness.py @@ -197,16 +197,17 @@ class Harness: awg_fmt = f' ({mm2_equiv(cable.gauge)} mm\u00B2)' rows = [[remove_links(cable.name) if cable.show_name else None], - [f'P/N: {remove_links(cable.pn)}' if (cable.pn and not isinstance(cable.pn, list)) else None, - html_line_breaks(manufacturer_info_field( - cable.manufacturer if not isinstance(cable.manufacturer, list) else None, - cable.mpn if not isinstance(cable.mpn, list) else None))], - [html_line_breaks(cable.type), + [bom_bubble('###') if self.show_bom_item_numbers else None, # TODO: Show actual BOM number + html_line_breaks(cable.type), f'{cable.wirecount}x' if cable.show_wirecount else None, f'{cable.gauge} {cable.gauge_unit}{awg_fmt}' if cable.gauge else None, '+ S' if cable.shield else None, f'{cable.length} {cable.length_unit}' if cable.length > 0 else None, cable.color, html_colorbar(cable.color)], + [f'P/N: {remove_links(cable.pn)}' if (cable.pn and not isinstance(cable.pn, list)) else None, + html_line_breaks(manufacturer_info_field( + cable.manufacturer if not isinstance(cable.manufacturer, list) else None, + cable.mpn if not isinstance(cable.mpn, list) else None))], '', [html_image(cable.image)], [html_caption(cable.image)]]