}
-InsetText::InsetText()
+InsetText::InsetText(BufferParams const & bp)
: UpdatableInset(), lt(0), in_update(false), do_resize(0),
do_reinit(false)
{
par = new Paragraph;
+ par->layout(textclasslist[bp.textclass].defaultLayoutName());
+
init();
}
}
if (y_offset < 0)
y_offset = y;
- lt->first = first;
+ lt->first_y = first;
if (cleared || (need_update&(INIT|FULL))) {
int yf = y_offset;
y = 0;
mouse_y = y;
int tmp_x = x - drawTextXOffset;
- int tmp_y = y + insetAscent - getLyXText(bv)->first;
+ int tmp_y = y + insetAscent - getLyXText(bv)->first_y;
Inset * inset = bv->checkInsetHit(getLyXText(bv), tmp_x, tmp_y);
hideInsetCursor(bv);
button);
}
int tmp_x = x - drawTextXOffset;
- int tmp_y = y + insetAscent - getLyXText(bv)->first;
+ int tmp_y = y + insetAscent - getLyXText(bv)->first_y;
Inset * inset = bv->checkInsetHit(getLyXText(bv), tmp_x, tmp_y);
bool ret = false;
if (inset) {
// Derive layout number from given argument (string)
// and current buffer's textclass (number). */
textclass_type tclass = bv->buffer()->params.textclass;
- string layout = lowercase(arg);
+ string layout = arg;
bool hasLayout = textclasslist[tclass].hasLayout(layout);
// If the entry is obsolete, use the new one instead.
textclasslist[tclass][layout].
obsoleted_by();
if (!obs.empty())
- layout = lowercase(obs);
+ layout = obs;
}
// see if we found the layout number:
}
if (bv->screen()) {
- t->first = bv->screen()->topCursorVisible(t);
+ t->first_y = bv->screen()->topCursorVisible(t);
}
if (!owner()) {
updateLocal(bv, FULL, false);
inset_y = cy(bv) + drawTextYOffset;
}
if (bv->screen()) {
- t->first = bv->screen()->topCursorVisible(t);
+ t->first_y = bv->screen()->topCursorVisible(t);
}
if (!owner()) {
updateLocal(bv, FULL, false);