Added checks to prevent magic from crashing when running various
commands on selections in a cell that is not editable. Moves and Copies were already handled correctly; this correction fixes Delete and transforms (e.g., rotates and flips).
This commit is contained in:
parent
4d6ef8e252
commit
c82c96cb73
|
|
@ -695,6 +695,9 @@ defnodeVisit(node, res, cap, defdata)
|
||||||
TTMaskZero(&tmask);
|
TTMaskZero(&tmask);
|
||||||
TTMaskSetMask(&tmask, &DBConnectTbl[magictype]);
|
TTMaskSetMask(&tmask, &DBConnectTbl[magictype]);
|
||||||
|
|
||||||
|
/* Avoid attempting to extract an implicit substrate into DEF */
|
||||||
|
if (node->efnode_type == TT_SPACE) return 0;
|
||||||
|
|
||||||
DBSrConnect(def, &node->efnode_loc, &tmask, DBConnectTbl,
|
DBSrConnect(def, &node->efnode_loc, &tmask, DBConnectTbl,
|
||||||
&TiPlaneRect, defNetGeometryFunc,
|
&TiPlaneRect, defNetGeometryFunc,
|
||||||
(ClientData)defdata);
|
(ClientData)defdata);
|
||||||
|
|
|
||||||
|
|
@ -149,6 +149,9 @@ SelEnumPaint(layers, editOnly, foundNonEdit, func, clientData)
|
||||||
arg.sea_rectList = NULL;
|
arg.sea_rectList = NULL;
|
||||||
if (foundNonEdit != NULL) *foundNonEdit = FALSE;
|
if (foundNonEdit != NULL) *foundNonEdit = FALSE;
|
||||||
|
|
||||||
|
/* EditCellUse is referenced in selEnumPFunc1() and must be non-NULL */
|
||||||
|
if (EditCellUse == NULL) return 1;
|
||||||
|
|
||||||
/* First, find all the paint in the selection that has the right
|
/* First, find all the paint in the selection that has the right
|
||||||
* layers. Use the same procedure as "dbCellUniqueTileSrFunc()"
|
* layers. Use the same procedure as "dbCellUniqueTileSrFunc()"
|
||||||
* so that contacts are not double-counted.
|
* so that contacts are not double-counted.
|
||||||
|
|
|
||||||
|
|
@ -103,6 +103,11 @@ SelectDelete(msg, do_clear)
|
||||||
|
|
||||||
extern int selDelPaintFunc(), selDelCellFunc(), selDelLabelFunc();
|
extern int selDelPaintFunc(), selDelCellFunc(), selDelLabelFunc();
|
||||||
|
|
||||||
|
if (EditCellUse == NULL)
|
||||||
|
{
|
||||||
|
TxError("The current cell is not editable.\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
(void) SelEnumPaint(&DBAllButSpaceAndDRCBits, TRUE, &nonEdit,
|
(void) SelEnumPaint(&DBAllButSpaceAndDRCBits, TRUE, &nonEdit,
|
||||||
selDelPaintFunc, (ClientData) NULL);
|
selDelPaintFunc, (ClientData) NULL);
|
||||||
if (nonEdit)
|
if (nonEdit)
|
||||||
|
|
@ -964,6 +969,11 @@ SelectTransform(transform)
|
||||||
* visible) coordinates.
|
* visible) coordinates.
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
|
if (EditCellUse == NULL)
|
||||||
|
{
|
||||||
|
TxError("The current cell is not editable.\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* Copy from SelectDef to Select2Def, transforming along the way. */
|
/* Copy from SelectDef to Select2Def, transforming along the way. */
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue