Stefan Schimanski wrote:
Here is a fix for the grey-bar bug, i.e. randomly only the current paragraph is drawn and everything else is greyed out.
It'd be great if this fixed this bug. It's very annoying.

Richard

I think it is related to synthetic mouse event. Somehow a redraw is triggered, but the ViewMetric.update_strategy is set to NoScreenUpdate. The two condition, that I change in the patch, evaluate to true and the grey bars are drawn.

Here is a backtrace of the issue:

#0 lyx::paintText ([EMAIL PROTECTED], [EMAIL PROTECTED]) at /Users/sts/Quellen/mac/lyx-devel/src/rowpainter.cpp:1065 #1 0x0023570a in lyx::frontend::GuiWorkArea::updateScreen (this=0x261a0e30) at /Users/sts/Quellen/mac/lyx-devel/src/frontends/qt4/GuiWorkArea.cpp:592 #2 0x0023574f in lyx::frontend::GuiWorkArea::expose (this=0x261a0e30, x=0, y=31, w=671, h=105) at /Users/sts/Quellen/mac/lyx-devel/src/frontends/qt4/GuiWorkArea.cpp:575 #3 0x0022295a in lyx::frontend::WorkArea::redraw (this=0x261a0e44) at /Users/sts/Quellen/mac/lyx-devel/src/frontends/WorkArea.cpp:159 #4 0x00223212 in lyx::frontend::WorkArea::dispatch (this=0x261a0e44, [EMAIL PROTECTED], k=none) at /Users/sts/Quellen/mac/lyx-devel/src/frontends/WorkArea.cpp:218 #5 0x00237432 in lyx::frontend::GuiWorkArea::mouseMoveEvent (this=0x261a0e30, e=0xbfffefe0) at /Users/sts/Quellen/mac/lyx-devel/src/frontends/qt4/GuiWorkArea.cpp:414

It happened with two footnote in the view, just moving the mouse around. So could it be related to the mouse hover maybe?

I think though that the change in the patch is reasonable nevertheless. The comparison to SingleParUpdate is wrong. The drawText function must work with every update_strategy.

Stefan

Index: lyx-devel/src/rowpainter.cpp
===================================================================
--- lyx-devel.orig/src/rowpainter.cpp 2007-06-08 07:09:41.000000000 +0200
+++ lyx-devel/src/rowpainter.cpp    2007-06-09 14:17:25.000000000 +0200
@@ -1061,12 +1061,12 @@
    // and grey out above (should not happen later)
//    lyxerr << "par ascent: " << text.getPar(vi.p1).ascent() << endl;
-    if (vi.y1 > 0 && vi.update_strategy != SingleParUpdate)
+    if (vi.y1 > 0 && vi.update_strategy == FullScreenUpdate)
pain.fillRectangle(0, 0, bv.workWidth(), vi.y1, Color::bottomarea);
    // and possibly grey out below
//    lyxerr << "par descent: " << text.getPar(vi.p1).ascent() << endl;
- if (vi.y2 < bv.workHeight() && vi.update_strategy != SingleParUpdate) + if (vi.y2 < bv.workHeight() && vi.update_strategy == FullScreenUpdate) pain.fillRectangle(0, vi.y2, bv.workWidth(), bv.workHeight() - vi.y2, Color::bottomarea);
}



--
==================================================================
Richard G Heck, Jr
Professor of Philosophy
Brown University
http://frege.brown.edu/heck/
==================================================================
Get my public key from http://sks.keyserver.penguin.de
Hash: 0x1DE91F1E66FFBDEC
Learn how to sign your email using Thunderbird and GnuPG at:
http://dudu.dyn.2-h.org/nist/gpg-enigmail-howto

Reply via email to