]> git.lyx.org Git - features.git/commitdiff
remove useless in_ert variable
authorGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Thu, 28 Dec 2006 10:24:45 +0000 (10:24 +0000)
committerGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Thu, 28 Dec 2006 10:24:45 +0000 (10:24 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16411 a592a061-630c-0410-9148-cb99ea01b6c8

src/text.C

index 63975523216815f625c9535ceeb07fa37e597ae8..5cebd7ef671faab197dd7e08e145e78a96a84514 100644 (file)
@@ -1779,7 +1779,6 @@ bool LyXText::dissolveInset(LCursor & cur) {
        if (isMainText(*cur.bv().buffer()) || cur.inset().nargs() != 1)
                return false;
 
-       bool const in_ert = cur.inset().lyxCode() == InsetBase::ERT_CODE;
        recordUndoInset(cur);
        cur.selHandle(false);
        // save position
@@ -1796,17 +1795,14 @@ bool LyXText::dissolveInset(LCursor & cur) {
        Buffer & b = cur.buffer();
        cur.paragraph().eraseChar(cur.pos(), b.params().trackChanges);
        if (!plist.empty()) {
-               if (in_ert) {
-                       // ERT paragraphs have the Language latex_language.
-                       // This is invalid outside of ERT, so we need to
-                       // change it to the buffer language.
-                       ParagraphList::iterator it = plist.begin();
-                       ParagraphList::iterator it_end = plist.end();
-                       for (; it != it_end; it++) {
-                               it->changeLanguage(b.params(),
-                                               latex_language,
-                                               b.getLanguage());
-                       }
+               // ERT paragraphs have the Language latex_language.
+               // This is invalid outside of ERT, so we need to
+               // change it to the buffer language.
+               ParagraphList::iterator it = plist.begin();
+               ParagraphList::iterator it_end = plist.end();
+               for (; it != it_end; it++) {
+                       it->changeLanguage(b.params(), latex_language,
+                                       b.getLanguage());
                }
 
                pasteParagraphList(cur, plist, b.params().textclass,