Skip to content

Commit 06a9cd9

Browse files
authored
fix: display alternate pin functions in sch symbol (#154)
1 parent a020186 commit 06a9cd9

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎src/kicad/schematic.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1404,7 +1404,7 @@ export class SchematicSymbolInstance {
14041404
export class PinInstance {
14051405
number: string;
14061406
uuid: string;
1407-
alternate: string;
1407+
alternate?: string;
14081408

14091409
constructor(
14101410
expr: Parseable,

‎src/viewers/schematic/painters/pin.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ export class PinPainter extends SchematicItemPainter {
201201
draw_name_and_number(gfx: Renderer, pin: PinInfo) {
202202
const def = pin.def;
203203
const libsym = pin.pin.parent.lib_symbol;
204-
const name = def.name.text;
204+
const name = pin.pin.alternate ?? def.name.text;
205205
const number = def.number.text;
206206
const pin_length = def.length;
207207
const hide_pin_names = libsym.pin_names.hide || !name || name == "~";

0 commit comments

Comments
 (0)