+2001-12-09 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
+
+ * insettext.C (draw):
+ (drawFrame): use insetWidth instead of last_width
+
+ * insettext.h: remove variable last_width (insetWidth is exactly
+ the same) and last_height (computed but never used!)
+
2001-12-10 Allan Rae <rae@lyx.org>
* insettabular.C (localDispatch): cleanup unlockInsetInInset calls
2001-12-05 Juergen Vigna <jug@sad.it>
* insettext.C (insetAllowed): fixed for the case that we directly
- ask the insettext from it's LyXText.
+ ask the insettext from its LyXText.
(paragraph): fixed the crash when assigning the par->next() from
the EmptyParagraphMechanism!
2001-07-18 Juergen Vigna <jug@sad.it>
* insetcollapsable.C (edit): fixed hopefully the y parameter which
- is givven to the InsetText.
+ is given to the InsetText.
(insetButtonPress): ditto
(insetButtonRelease): ditto
(insetMotionNotify): ditto
autoBreakRows = false;
}
top_y = 0;
- last_width = 0;
- last_height = 0;
insetAscent = 0;
insetDescent = 0;
insetWidth = 0;
x += static_cast<float>(scroll());
// if top_x differs we did it already
- if (!cleared && (top_x == int(x)) &&
- ((need_update&(INIT|FULL)) || (top_baseline!=baseline) ||
- (last_drawn_width!=insetWidth))) {
+ if (!cleared && (top_x == int(x))
+ && ((need_update&(INIT|FULL)) || (top_baseline != baseline)
+ ||(last_drawn_width != insetWidth))) {
clearInset(bv, baseline, cleared);
}
top_baseline = baseline;
top_y = baseline - ascent(bv, f);
- last_width = width(bv, f);
- last_height = ascent(bv, f) + descent(bv, f);
if (last_drawn_width != insetWidth) {
if (!cleared)
if (!cleared && (need_update == CURSOR)
&& !getLyXText(bv)->selection.set()) {
drawFrame(pain, cleared);
- x += last_width; // was width(bv, f);
+ x += insetWidth;
need_update = NONE;
return;
}
clearFrame(pain, cleared);
}
- x += last_width /* was width(bv, f) */ - TEXT_TO_INSET_OFFSET;
+ x += insetWidth - TEXT_TO_INSET_OFFSET;
if (bv->text->status() == LyXText::CHANGED_IN_DRAW) {
need_update |= FULL;
if (!frame_is_visible || cleared) {
frame_x = top_x + ttoD2;
frame_y = top_baseline - insetAscent + ttoD2;
- frame_w = last_width - TEXT_TO_INSET_OFFSET;
+ frame_w = insetWidth - TEXT_TO_INSET_OFFSET;
frame_h = insetAscent + insetDescent - TEXT_TO_INSET_OFFSET;
pain.rectangle(frame_x, frame_y,
frame_w, frame_h,