Modified GDS read output to avoid generating error messages on

unrecognized layers when the "readonly" read option is set.
Added support to scale elements (from the "element" command,
such as the measurement text and arrows) when the grid scales,
which was missing.  Corrected the output of persistent elements
in a .mag file so that they are correctly scaled by the scale
reducer.
This commit is contained in:
Tim Edwards
2020-05-12 12:03:38 -04:00
parent 838591bdf2
commit 55ff3fd1ff
7 changed files with 72 additions and 10 deletions
+10
View File
@@ -111,6 +111,16 @@ DBCellRename(cellname, newname)
return FALSE;
}
/* Disallow renaming if the cell has the READONLY flag set, */
/* because the cellname must match the name in the GDS */
/* file referenced. */
if ((celldef->cd_flags & CDVENDORGDS) == CDVENDORGDS)
{
TxError("Attempt to rename read-only cell \"%s\"\n", cellname);
return FALSE;
}
/* Good to go! */
UndoDisable();
+4 -1
View File
@@ -30,6 +30,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/
#include "utils/hash.h"
#include "database/database.h"
#include "database/databaseInt.h"
#include "dbwind/dbwind.h"
#include "textio/textio.h"
#include "utils/signals.h"
#include "windows/windows.h"
@@ -1496,7 +1497,6 @@ DBScaleEverything(scalen, scaled)
int scalen, scaled;
{
void ToolScaleBox();
void DBWScaleCrosshair();
int dbCellDefEnumFunc();
LinkedCellDef *lhead, *lcd;
@@ -1526,6 +1526,9 @@ DBScaleEverything(scalen, scaled)
lcd = lcd->cd_next;
}
/* Scale all elements */
DBWScaleElements(scalen, scaled);
/* Recovery of global plane pointers */
MZAttachHintPlanes();
+1 -1
View File
@@ -2558,7 +2558,7 @@ DBCellWriteFile(cellDef, f)
}
/* Now any persistent elements */
estring = DBWPrintElements(cellDef, DBW_ELEMENT_PERSISTENT);
estring = DBWPrintElements(cellDef, DBW_ELEMENT_PERSISTENT, reducer);
if (estring != NULL)
{
FPRINTF(f, "<< elements >>\n");