Skip to content

Commit

Permalink
Implement show_colorname for cables
Browse files Browse the repository at this point in the history
  • Loading branch information
martinrieder committed Jul 13, 2024
1 parent 8c69a00 commit 5e4271d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/wireviz/DataClasses.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ class Cable:
show_name: Optional[bool] = None
show_wirecount: bool = True
show_wirenumbers: Optional[bool] = None
show_colorname: bool = True
ignore_in_bom: bool = False
additional_components: List[AdditionalComponent] = field(default_factory=list)

Expand Down
2 changes: 1 addition & 1 deletion src/wireviz/Harness.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ def create_graph(self) -> Graph:
colorstr = wv_colors.translate_color(
connection_color, self.options.color_mode
)
if colorstr:
if colorstr and cable.show_colorname:
wireinfo.append(colorstr)
if cable.wirelabels:
wireinfo.append(wirelabel if wirelabel is not None else "")
Expand Down

0 comments on commit 5e4271d

Please sign in to comment.