From 8b9c47c3efe9e507c9f32bccd393bf2efd1fa8ed Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Thu, 1 Apr 2021 13:09:08 -0400 Subject: [PATCH] Removed the stupid restriction that "cellname readwrite" won't work on a non-writeable cell. While technically valid, that just means that nobody can make temporary edits on the cell in memory, which is useful in many applications. A slight quirk of the "cellname" command is that if applied to the cell currently in the layout window, it is not possible to make the cell show as edited and editable until leaving and re-entering the cell. --- commands/CmdCD.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/commands/CmdCD.c b/commands/CmdCD.c index 2eec220e..bb779d87 100644 --- a/commands/CmdCD.c +++ b/commands/CmdCD.c @@ -1084,13 +1084,11 @@ CmdCellname(w, cmd) if (cellDef->cd_fd == -1) dbReadOpen(cellDef, NULL, TRUE, NULL); - if (cellDef->cd_fd != -1) - cellDef->cd_flags &= ~CDNOEDIT; - else - TxError("Advisory lock held on cell %s\n", cellDef->cd_name); -#else - cellDef->cd_flags &= ~CDNOEDIT; + if (cellDef->cd_fd == -1) + TxError("Warning: Cell %s is not writeable\n", cellDef->cd_name); #endif + + cellDef->cd_flags &= ~CDNOEDIT; WindAreaChanged(w, &w->w_screenArea); CmdSetWindCaption(EditCellUse, EditRootDef); }