]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetNote.cpp
Properly fix handling of title layouts within insets (#11787)
[lyx.git] / src / insets / InsetNote.cpp
index 1c039c3bc52e9742a6f031c90aa9c870d3bce72f..31df791f59a0e237df21bbc194a60b598da16804 100644 (file)
@@ -116,12 +116,6 @@ docstring InsetNote::layoutName() const
 }
 
 
-Inset::DisplayType InsetNote::display() const
-{
-       return Inline;
-}
-
-
 void InsetNote::write(ostream & os) const
 {
        params_.write(os);
@@ -186,9 +180,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);
@@ -293,7 +284,7 @@ int InsetNote::docbook(odocstream & os, OutputParams const & runparams_in) const
 }
 
 
-docstring InsetNote::xhtml(XHTMLStream & xs, OutputParams const & rp) const
+docstring InsetNote::xhtml(XMLStream & xs, OutputParams const & rp) const
 {
        if (params_.type == InsetNoteParams::Note)
                return docstring();
@@ -315,6 +306,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: