From 7546991b04c0089f5765dc2854081d6aa90842eb Mon Sep 17 00:00:00 2001 From: KV Date: Fri, 12 Feb 2021 21:31:52 +0100 Subject: [PATCH] Show connector pins even when all are unconnected Bug: Hiding connector pins when none are connected is not reasonable. When combined with loops or neither pinlabels nor pincolors, then exceptions are raised as well. Fix: Forcing pins at the left side in such cases solves #217. --- src/wireviz/Harness.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/wireviz/Harness.py b/src/wireviz/Harness.py index 9d83a3d..5a8c172 100644 --- a/src/wireviz/Harness.py +++ b/src/wireviz/Harness.py @@ -111,6 +111,10 @@ class Harness: for connector in self.connectors.values(): + # If no wires connected (except maybe loop wires)? + if not (connector.ports_left or connector.ports_right): + connector.ports_left = True # Use left side pins. + html = [] rows = [[remove_links(connector.name) if connector.show_name else None],