fix bug 6698

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36519 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Georg Baum 2010-11-26 17:14:21 +00:00
parent b8b971cdd5
commit e57084c140

View File

@ -145,11 +145,28 @@ Inset * createInsetHelper(Buffer * buf, FuncRequest const & cmd)
case LFUN_ARGUMENT_INSERT:
return new InsetArgument(buf);
case LFUN_FLOAT_INSERT:
return new InsetFloat(buf, to_utf8(cmd.argument()));
case LFUN_FLOAT_INSERT: {
string argument = to_utf8(cmd.argument());
if (!argument.empty()) {
if (!contains(argument, "sideways")) {
if (!contains(argument, "wide"))
argument += "\nwide false";
argument += "\nsideways false";
}
}
return new InsetFloat(buf, argument);
}
case LFUN_FLOAT_WIDE_INSERT: {
InsetFloat * fl = new InsetFloat(buf, to_utf8(cmd.argument()));
string argument = to_utf8(cmd.argument());
if (!argument.empty()) {
if (!contains(argument, "sideways")) {
if (!contains(argument, "wide"))
argument += "\nwide true";
argument += "\nsideways false";
}
}
InsetFloat * fl = new InsetFloat(buf, argument);
fl->setWide(true);
return fl;
}