]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetNote.cpp
requires is a keyword in C++2a
[lyx.git] / src / insets / InsetNote.cpp
index ef946db3388e3dcb326f4529bb1b8dba4caa50e6..9f4c5ed1d0349b130c81a6bf214db737b183bd1a 100644 (file)
@@ -17,9 +17,7 @@
 #include "Buffer.h"
 #include "BufferParams.h"
 #include "BufferView.h"
-#include "BufferParams.h"
 #include "ColorSet.h"
-#include "Counters.h"
 #include "Cursor.h"
 #include "DispatchResult.h"
 #include "Exporter.h"
@@ -188,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);
@@ -317,6 +312,8 @@ void InsetNote::validate(LaTeXFeatures & features) const
                        features.useInsetLayout(getLayout());
                break;
        case InsetNoteParams::Greyedout:
+               if (features.hasRTLLanguage())
+                       features.require("environ");
                InsetCollapsible::validate(features);
                break;
        case InsetNoteParams::Note: