]> git.lyx.org Git - features.git/commitdiff
Fix unnecessary cprotect
authorJuergen Spitzmueller <spitz@lyx.org>
Sun, 20 Sep 2020 06:45:42 +0000 (08:45 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Sun, 20 Sep 2020 06:45:42 +0000 (08:45 +0200)
src/Paragraph.cpp

index 7f707bc9f190e8392af99f0fea379517bf477373..93d0c175c13130ef4b694d51b2db7cd8214850ac 100644 (file)
@@ -3912,9 +3912,6 @@ bool Paragraph::needsCProtection(bool const fragile) const
                Inset const * ins = getInset(i);
                if (ins->needsCProtection(maintext, fragile))
                        return true;
-               if (ins->getLayout().latextype() == InsetLayout::ENVIRONMENT)
-                       // Environments need cprotection regardless the content
-                       return true;
                // Now check math environments
                InsetMath const * im = getInset(i)->asInsetMath();
                if (!im || im->cell(0).empty())