Implement show_colorname for cables

This commit is contained in:
Martin Rieder 2024-07-13 16:50:48 +02:00
parent 8c69a0030e
commit 5e4271df1c
2 changed files with 2 additions and 1 deletions

View File

@ -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)

View File

@ -352,7 +352,7 @@ class Harness:
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 "")