mirror of
https://github.com/RTimothyEdwards/magic.git
synced 2026-10-06 09:53:00 +02:00
Still recovering from unintended consequences of setting EditCellUse
to NULL for a read-only view. . . Changed the command "what" so that it will not fail on a non-edit cell. There are likely a few other commands that should not fail on non-edit cells because they do not alter anything.
This commit is contained in:
+10
-1
@@ -930,7 +930,7 @@ CmdWhat(w, cmd)
|
||||
TxCommand *cmd; /* Information about the command. */
|
||||
{
|
||||
int i, locargc;
|
||||
bool foundAny;
|
||||
bool foundAny, editNull = FALSE;
|
||||
bool doList = FALSE, doListAll = FALSE;
|
||||
TileTypeBitMask layers, maskBits, *rMask;
|
||||
CellUse *CheckUse;
|
||||
@@ -974,12 +974,21 @@ CmdWhat(w, cmd)
|
||||
}
|
||||
#endif
|
||||
|
||||
/* The "what" command should not fail if there is no edit cell */
|
||||
if (EditCellUse == NULL)
|
||||
{
|
||||
editNull = TRUE;
|
||||
EditCellUse = w->w_surfaceID;
|
||||
}
|
||||
|
||||
/* Find all the selected paint and print out the layer names. */
|
||||
|
||||
TTMaskZero(&layers);
|
||||
(void) SelEnumPaint(&DBAllButSpaceAndDRCBits, FALSE, (bool *) NULL,
|
||||
cmdWhatPaintFunc, (ClientData) &layers);
|
||||
|
||||
if (editNull == TRUE) EditCellUse = (CellUse *)NULL;
|
||||
|
||||
if (!TTMaskIsZero(&layers))
|
||||
{
|
||||
/* If there are any stacked types in the list, decompose them */
|
||||
|
||||
Reference in New Issue
Block a user