mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-04 08:37:52 +00:00
Fixed small drawing bug in InsetText.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3403 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
c446acbd86
commit
17a937723c
@ -9,6 +9,7 @@ src/converter.C
|
|||||||
src/CutAndPaste.C
|
src/CutAndPaste.C
|
||||||
src/debug.C
|
src/debug.C
|
||||||
src/exporter.C
|
src/exporter.C
|
||||||
|
src/ext_l10n.h
|
||||||
src/figure_form.C
|
src/figure_form.C
|
||||||
src/figureForm.C
|
src/figureForm.C
|
||||||
src/FontLoader.C
|
src/FontLoader.C
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
2002-01-17 Juergen Vigna <jug@sad.it>
|
||||||
|
|
||||||
|
* insettext.C (draw): width() function was called without setting
|
||||||
|
the right top_x which could lead to wrong insetWidth setting!
|
||||||
|
|
||||||
2002-01-16 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
|
2002-01-16 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
|
||||||
|
|
||||||
* insetbib.C (getFiles): uncomment Path variable.
|
* insetbib.C (getFiles): uncomment Path variable.
|
||||||
|
@ -350,15 +350,13 @@ void InsetText::draw(BufferView * bv, LyXFont const & f,
|
|||||||
int old_x = top_x;
|
int old_x = top_x;
|
||||||
if (top_x != int(x)) {
|
if (top_x != int(x)) {
|
||||||
top_x = int(x);
|
top_x = int(x);
|
||||||
|
topx_set = true;
|
||||||
int nw = getMaxWidth(bv, this);
|
int nw = getMaxWidth(bv, this);
|
||||||
if (nw > 0 && old_max_width != nw) {
|
if (nw > 0 && old_max_width != nw) {
|
||||||
need_update = INIT;
|
need_update = INIT;
|
||||||
old_max_width = nw;
|
old_max_width = nw;
|
||||||
bv->text->status(bv, LyXText::CHANGED_IN_DRAW);
|
bv->text->status(bv, LyXText::CHANGED_IN_DRAW);
|
||||||
topx_set = true;
|
|
||||||
return;
|
return;
|
||||||
} else {
|
|
||||||
top_x = old_x;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -370,15 +368,11 @@ void InsetText::draw(BufferView * bv, LyXFont const & f,
|
|||||||
|
|
||||||
// repaint the background if needed
|
// repaint the background if needed
|
||||||
if (cleared && backgroundColor() != LColor::background) {
|
if (cleared && backgroundColor() != LColor::background) {
|
||||||
top_x = int(x);
|
|
||||||
clearInset(bv, baseline, cleared);
|
clearInset(bv, baseline, cleared);
|
||||||
top_x = old_x;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// no draw is necessary !!!
|
// no draw is necessary !!!
|
||||||
if ((drawFrame_ == LOCKED) && !locked && !par->size()) {
|
if ((drawFrame_ == LOCKED) && !locked && !par->size()) {
|
||||||
top_x = int(x);
|
|
||||||
topx_set = true;
|
|
||||||
top_baseline = baseline;
|
top_baseline = baseline;
|
||||||
x += width(bv, f);
|
x += width(bv, f);
|
||||||
if (need_update & CLEAR_FRAME)
|
if (need_update & CLEAR_FRAME)
|
||||||
@ -392,15 +386,15 @@ void InsetText::draw(BufferView * bv, LyXFont const & f,
|
|||||||
x += static_cast<float>(scroll());
|
x += static_cast<float>(scroll());
|
||||||
|
|
||||||
// if top_x differs we did it already
|
// if top_x differs we did it already
|
||||||
if (!cleared && (top_x == int(x))
|
if (!cleared && (old_x == int(x))
|
||||||
&& ((need_update&(INIT|FULL)) || (top_baseline != baseline)
|
&& ((need_update&(INIT|FULL)) || (top_baseline != baseline)
|
||||||
||(last_drawn_width != insetWidth))) {
|
||(last_drawn_width != insetWidth)))
|
||||||
|
{
|
||||||
// Condition necessary to eliminate bug 59 attachment 37
|
// Condition necessary to eliminate bug 59 attachment 37
|
||||||
if (baseline > 0) clearInset(bv, baseline, cleared);
|
if (baseline > 0)
|
||||||
|
clearInset(bv, baseline, cleared);
|
||||||
}
|
}
|
||||||
|
|
||||||
top_x = int(x);
|
|
||||||
topx_set = true;
|
|
||||||
if (cleared)
|
if (cleared)
|
||||||
frame_is_visible = false;
|
frame_is_visible = false;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user