Helge Hafting ha scritto:
He offered to do the calculation in the background. That gives the
I'm already on the way ... almost working, but need further debugging.
After that, guess my last change will be to make Abdel happy and
confine the nice-scrolling behaviour within the BufferView class, so to
avoid too many changes to TextMetrics (and the ParMetricsCache class).

On a related note, in order to call a method when the GUI is "idle",
I'm using the QTimer::singleShot() method, with a delta_time of 0.
Do you think that would turn to be useful for other things as well ?
I mean, something like GuiView::doWhenIdle(this, &myMethod):

 template<class T>
 static GuiView::doWhenIdle(T *, bool (T::*)(void))

(with something like myMethod() returning true or false meaning call me
again or not).
Any drawbacks with such an approach (I know there is a support/timer.h
class, but guess it cannot know when the GUI is idle).

   T.
best of both worlds - You can start editing as soon as the .lyx file is
parsed. You can scroll immediately, and the scrolling will be "perfect"
after a few seconds.

Speed sure is nice, but the current scrolling that breaks on common
corner cases is not good.

Helge Hafting


Reply via email to