+2005-04-11 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
+
+ * text3.C (dispatch): change the layout to "Caption" after inserting
+ a float.
+
2005-04-12 Martin Vermeer <martin.vermeer@hut.fi>
* text3.C (dispatch): fix language problem in newly created
+2005-04-11 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
+
+ * insetfloat.C (InsetFloat):
+ * insetwrap.C (InsetWrap): do not set layout here.
+
2005-04-13 Georg Baum <Georg.Baum@post.rwth-aachen.de>
* insetbase.C (getStatus): handle LFUN_INSET_MODIFY and
setLabelFont(font);
params_.type = type;
setInsetName(type);
- LyXTextClass const & tclass = bp.getLyXTextClass();
- if (tclass.hasLayout(caplayout))
- paragraphs().begin()->layout(tclass[caplayout]);
}
params_.type = type;
params_.width = LyXLength(50, LyXLength::PCW);
setInsetName(type);
- LyXTextClass const & tclass = bp.getLyXTextClass();
- if (tclass.hasLayout(caplayout))
- paragraphs().begin()->layout(tclass[caplayout]);
}
case LFUN_INSERT_BRANCH:
case LFUN_INSERT_BIBITEM:
case LFUN_INSET_ERT:
- case LFUN_INSET_FLOAT:
case LFUN_INSET_FOOTNOTE:
case LFUN_INSET_MARGINAL:
case LFUN_INSET_OPTARG:
- case LFUN_INSET_WIDE_FLOAT:
- case LFUN_INSET_WRAP:
case LFUN_TABULAR_INSERT:
case LFUN_ENVIRONMENT_INSERT:
// Open the inset, and move the current selection
cur.posRight();
break;
+ case LFUN_INSET_FLOAT:
+ case LFUN_INSET_WIDE_FLOAT:
+ case LFUN_INSET_WRAP:
+ doInsertInset(cur, this, cmd, true, true);
+ cur.posRight();
+ // FIXME: the "Caption" name should not be hardcoded,
+ // but given by the float definition.
+ cur.dispatch(FuncRequest(LFUN_LAYOUT, "Caption"));
+ break;
+
case LFUN_INDEX_INSERT:
// Just open the inset
doInsertInset(cur, this, cmd, true, false);