From 4e9e9881b20109010232b9c89f042ed0c75f6d09 Mon Sep 17 00:00:00 2001 From: Scott Kostyshak Date: Thu, 19 Apr 2018 12:16:23 -0400 Subject: [PATCH] Greyedouts can be inserted in commands/description This change also applies to Comment insets. For example, Greyedout and comment insets can now be inserted in section titles. The usage of these insets in commands relies on the newly implemented cprotect feature. The usage of these insets in description items already worked fine (without cprotect). This commit also enables modification of these insets (e.g., converting a LyX note to a Greyedout note) in commands. This commit is related to #6969. --- src/Text3.cpp | 5 ----- src/insets/InsetNote.cpp | 3 --- 2 files changed, 8 deletions(-) diff --git a/src/Text3.cpp b/src/Text3.cpp index e3e436bac5..c5cc428375 100644 --- a/src/Text3.cpp +++ b/src/Text3.cpp @@ -2911,11 +2911,6 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd, } case LFUN_NOTE_INSERT: code = NOTE_CODE; - // in commands (sections etc.) and description items, - // only Notes are allowed - enable = (cmd.argument().empty() || cmd.getArg(0) == "Note" || - (!cur.paragraph().layout().isCommand() - && !inDescriptionItem(cur))); break; case LFUN_FLEX_INSERT: { code = FLEX_CODE; diff --git a/src/insets/InsetNote.cpp b/src/insets/InsetNote.cpp index 1c039c3bc5..02f47ba30e 100644 --- a/src/insets/InsetNote.cpp +++ b/src/insets/InsetNote.cpp @@ -186,9 +186,6 @@ bool InsetNote::getStatus(Cursor & cur, FuncRequest const & cmd, switch (cmd.action()) { case LFUN_INSET_MODIFY: - // disallow comment and greyed out in commands - flag.setEnabled(!cur.paragraph().layout().isCommand() || - cmd.getArg(2) == "Note"); if (cmd.getArg(0) == "note") { InsetNoteParams params; string2params(to_utf8(cmd.argument()), params);