commit 4e9e9881b20109010232b9c89f042ed0c75f6d09
Author: Scott Kostyshak <[email protected]>
Date: Thu Apr 19 12:16:23 2018 -0400
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, 0 insertions(+), 8 deletions(-)
diff --git a/src/Text3.cpp b/src/Text3.cpp
index e3e436b..c5cc428 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 1c039c3..02f47ba 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);