mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-25 05:55:34 +00:00
remove useless in_ert variable
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16411 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
63524a4184
commit
ea81b496be
20
src/text.C
20
src/text.C
@ -1779,7 +1779,6 @@ bool LyXText::dissolveInset(LCursor & cur) {
|
|||||||
if (isMainText(*cur.bv().buffer()) || cur.inset().nargs() != 1)
|
if (isMainText(*cur.bv().buffer()) || cur.inset().nargs() != 1)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
bool const in_ert = cur.inset().lyxCode() == InsetBase::ERT_CODE;
|
|
||||||
recordUndoInset(cur);
|
recordUndoInset(cur);
|
||||||
cur.selHandle(false);
|
cur.selHandle(false);
|
||||||
// save position
|
// save position
|
||||||
@ -1796,17 +1795,14 @@ bool LyXText::dissolveInset(LCursor & cur) {
|
|||||||
Buffer & b = cur.buffer();
|
Buffer & b = cur.buffer();
|
||||||
cur.paragraph().eraseChar(cur.pos(), b.params().trackChanges);
|
cur.paragraph().eraseChar(cur.pos(), b.params().trackChanges);
|
||||||
if (!plist.empty()) {
|
if (!plist.empty()) {
|
||||||
if (in_ert) {
|
// ERT paragraphs have the Language latex_language.
|
||||||
// ERT paragraphs have the Language latex_language.
|
// This is invalid outside of ERT, so we need to
|
||||||
// This is invalid outside of ERT, so we need to
|
// change it to the buffer language.
|
||||||
// change it to the buffer language.
|
ParagraphList::iterator it = plist.begin();
|
||||||
ParagraphList::iterator it = plist.begin();
|
ParagraphList::iterator it_end = plist.end();
|
||||||
ParagraphList::iterator it_end = plist.end();
|
for (; it != it_end; it++) {
|
||||||
for (; it != it_end; it++) {
|
it->changeLanguage(b.params(), latex_language,
|
||||||
it->changeLanguage(b.params(),
|
b.getLanguage());
|
||||||
latex_language,
|
|
||||||
b.getLanguage());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pasteParagraphList(cur, plist, b.params().textclass,
|
pasteParagraphList(cur, plist, b.params().textclass,
|
||||||
|
Loading…
Reference in New Issue
Block a user