Fix bug #7895: Do not output lines with only a single space.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_2_0_X@40194 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Georg Baum 2011-11-14 21:04:00 +00:00
parent 044565f535
commit b6eb513d94
2 changed files with 7 additions and 2 deletions

View File

@ -1161,6 +1161,8 @@ void parse_environment(Parser & p, ostream & os, bool outer,
}
else if (parent_context.textclass.floats().typeExist(unstarred_name)) {
eat_whitespace(p, os, parent_context, false);
string const opt = p.hasOpt() ? p.getArg('[', ']') : string();
eat_whitespace(p, os, parent_context, false);
parent_context.check_layout(os);
begin_inset(os, "Float " + unstarred_name + "\n");
@ -1172,8 +1174,8 @@ void parse_environment(Parser & p, ostream & os, bool outer,
float_type = unstarred_name;
else
float_type = "";
if (p.hasOpt())
os << "placement " << p.getArg('[', ']') << '\n';
if (!opt.empty())
os << "placement " << opt << '\n';
os << "wide " << convert<string>(is_starred)
<< "\nsideways false"
<< "\nstatus open\n\n";

View File

@ -170,6 +170,9 @@ What's new
- Fix tex2lyx handling of description \item with spaces (bug 7663).
- tex2lyx does not start floats with lines containing only a single space
anymore (bug 7895).
- Store the autosave files of unnamed buffers in the correct directory
and make sure they are not left behind after saving (bug 7793).