Corrected an error in which the selection definition may contain
invalid pointers to a cell that was deleted while it was selected. Solution is to clear selections before deleting a cell.
This commit is contained in:
parent
5da432b821
commit
4fd3089cfc
|
|
@ -741,11 +741,19 @@ CmdCellname(w, cmd)
|
||||||
|
|
||||||
case IDX_DELETE:
|
case IDX_DELETE:
|
||||||
/* Unload the cell definition and free memory */
|
/* Unload the cell definition and free memory */
|
||||||
|
/* Make sure selections are cleared or they may */
|
||||||
|
/* contain references to the deleted cell def. */
|
||||||
if ((locargc == 4) && !strcmp(cmd->tx_argv[3 + ((dolist) ? 1 : 0)],
|
if ((locargc == 4) && !strcmp(cmd->tx_argv[3 + ((dolist) ? 1 : 0)],
|
||||||
"-noprompt"))
|
"-noprompt"))
|
||||||
|
{
|
||||||
|
SelectClear();
|
||||||
DBCellDelete(cellname, TRUE);
|
DBCellDelete(cellname, TRUE);
|
||||||
|
}
|
||||||
else if (locargc == 3)
|
else if (locargc == 3)
|
||||||
|
{
|
||||||
|
SelectClear();
|
||||||
DBCellDelete(cellname, FALSE);
|
DBCellDelete(cellname, FALSE);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
TxError("Delete cell command missing cellname\n");
|
TxError("Delete cell command missing cellname\n");
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue