mirror of
https://github.com/RTimothyEdwards/magic.git
synced 2026-09-06 09:06:54 +02:00
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:
@@ -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();
|
||||
|
||||
@@ -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
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user