Skip to content

Commit

Permalink
Modified the "flatten" command so that flattened labels use an
Browse files Browse the repository at this point in the history
alternative separator "." instead of "/".  This prevents other
routines that expect "/" to indicate a true hierarchy from treating
the label as hierarchical instead of flat, which should be the
correct handling for a flattened cell.
  • Loading branch information
RTimothyEdwards committed Sep 8, 2022
1 parent 1c20aba commit 1178db4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions commands/CmdFI.c
Original file line number Diff line number Diff line change
Expand Up @@ -1917,6 +1917,13 @@ flatCopyAllLabels(scx, lab, tpath, targetUse)
n = tpath->tp_next;
f = tpath->tp_first;
c = *n;

/* Apply alternate path separator "." because we don't want */
/* the default "/" which will make the label be treated as */
/* an actual hierarchical name, such as when determining */
/* precedence of label names. */
if (tpath->tp_next != tpath->tp_first) *(n - 1) = '.';

strcpy(n, lab->lab_text);
DBPutFontLabel(def, &labTargetRect, lab->lab_font, lab->lab_size,
lab->lab_rotate, &lab->lab_offset, targetPos,
Expand Down

0 comments on commit 1178db4

Please # to comment.