Corrected the (minor) problem caused by the slightly different handling
of an alias that defines only one type (which is treated like it would be if it were declared on the same line as the original type declaration), such that the alias name does not become the default name for the layer (which is the one that ends up showing in the title bar when hovering over the layer toolbar icon). Mainly the problem showed up as "nwell" for the sky130A process appearing in the toolbar as "allwellplane".
This commit is contained in:
parent
a67b8cc395
commit
503a6bc190
|
|
@ -451,6 +451,9 @@ DBTechPrintTypes(mask, dolist)
|
|||
for (p = dbTypeNameLists.sn_next; p != &dbTypeNameLists;
|
||||
p = p->sn_next)
|
||||
{
|
||||
/* Ignore aliases */
|
||||
if (p->sn_alias) continue;
|
||||
|
||||
if (((TileType)(spointertype) p->sn_value) == i)
|
||||
{
|
||||
if (dolist)
|
||||
|
|
|
|||
|
|
@ -760,7 +760,7 @@ dbTechNameAdd(name, cdata, ptable, alias)
|
|||
*cp = '\0';
|
||||
if (*(cp = onename))
|
||||
{
|
||||
if ((current = dbTechNameAddOne(cp, cdata, FALSE, ptable)) == NULL)
|
||||
if ((current = dbTechNameAddOne(cp, cdata, FALSE, alias, ptable)) == NULL)
|
||||
return (NULL);
|
||||
if (first == NULL)
|
||||
first = current->sn_name;
|
||||
|
|
@ -793,10 +793,11 @@ dbTechNameAdd(name, cdata, ptable, alias)
|
|||
*/
|
||||
|
||||
NameList *
|
||||
dbTechNameAddOne(name, cdata, isPrimary, ptable)
|
||||
dbTechNameAddOne(name, cdata, isPrimary, isAlias, ptable)
|
||||
char *name; /* Name to be added */
|
||||
ClientData cdata; /* Client value associated with this name */
|
||||
bool isPrimary; /* TRUE if this is the primary abbreviation */
|
||||
bool isAlias; /* TRUE if this name is an alias */
|
||||
NameList *ptable; /* Table of names to which we're adding this */
|
||||
{
|
||||
int cmp;
|
||||
|
|
@ -817,6 +818,7 @@ dbTechNameAddOne(name, cdata, isPrimary, ptable)
|
|||
new->sn_name = StrDup((char **) NULL, name);
|
||||
new->sn_value = cdata;
|
||||
new->sn_primary = isPrimary;
|
||||
new->sn_alias = isAlias;
|
||||
|
||||
/* Link this entry in to the list before 'tbl' */
|
||||
new->sn_next = tbl;
|
||||
|
|
|
|||
|
|
@ -81,6 +81,7 @@ typedef struct namelist
|
|||
char *sn_name; /* Text of name */
|
||||
ClientData sn_value; /* Value (TileType or plane number) */
|
||||
bool sn_primary; /* If TRUE, this is the primary name */
|
||||
bool sn_alias; /* If TRUE, this is an alias name */
|
||||
} NameList;
|
||||
|
||||
typedef struct
|
||||
|
|
|
|||
Loading…
Reference in New Issue