Author: forenr
Date: Wed Jan 26 11:54:28 2011
New Revision: 37327
URL: http://www.lyx.org/trac/changeset/37327
Log:
Fix bug #7254 (LyX may insert a blank line when ending an environment)
Modified:
lyx-devel/branches/BRANCH_1_6_X/src/insets/InsetCollapsable.cpp
lyx-devel/branches/BRANCH_1_6_X/src/insets/InsetFloat.cpp
lyx-devel/branches/BRANCH_1_6_X/status.16x
Modified: lyx-devel/branches/BRANCH_1_6_X/src/insets/InsetCollapsable.cpp
==============================================================================
--- lyx-devel/branches/BRANCH_1_6_X/src/insets/InsetCollapsable.cpp Tue Jan
25 22:10:49 2011 (r37326)
+++ lyx-devel/branches/BRANCH_1_6_X/src/insets/InsetCollapsable.cpp Wed Jan
26 11:54:28 2011 (r37327)
@@ -831,7 +831,7 @@
if (layout_->latextype() == InsetLayout::COMMAND) {
os << "}";
} else if (layout_->latextype() == InsetLayout::ENVIRONMENT) {
- os << "\n\\end{" << from_utf8(layout_->latexname()) <<
"}\n";
+ os << "%\n\\end{" << from_utf8(layout_->latexname()) <<
"}\n";
i += 4;
}
}
Modified: lyx-devel/branches/BRANCH_1_6_X/src/insets/InsetFloat.cpp
==============================================================================
--- lyx-devel/branches/BRANCH_1_6_X/src/insets/InsetFloat.cpp Tue Jan 25
22:10:49 2011 (r37326)
+++ lyx-devel/branches/BRANCH_1_6_X/src/insets/InsetFloat.cpp Wed Jan 26
11:54:28 2011 (r37327)
@@ -355,8 +355,8 @@
int const i = InsetText::latex(os, runparams);
// The \n is used to force \end{<floatname>} to appear in a new line.
- // In this case, we do not case if the current output line is empty.
- os << "\n\\end{" << from_ascii(tmptype) << "}\n";
+ // Also in this case, we care that the current output line is not empty.
+ os << "%\n\\end{" << from_ascii(tmptype) << "}\n";
return i + 4;
}
Modified: lyx-devel/branches/BRANCH_1_6_X/status.16x
==============================================================================
--- lyx-devel/branches/BRANCH_1_6_X/status.16x Tue Jan 25 22:10:49 2011
(r37326)
+++ lyx-devel/branches/BRANCH_1_6_X/status.16x Wed Jan 26 11:54:28 2011
(r37327)
@@ -66,6 +66,9 @@
- Do not output PDF settings if these are disabled in the document
settings (bug 7052).
+- Avoid inserting a blank line before the end of an environment when
+ exporting to LaTeX a custom inset (bug 7254).
+
- Correctly check for RTF and DOC viewers.
- KOMA classes: Support the optional argument of Addpart, Addchap and