Tommaso Cucinotta wrote:
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).

Hi Tommaso,

While I am happy that you want to make me happy please don't do that only for that. I certainly hope that I convinced you but I don't want to force you on anything.

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))

I suggest to implement this if there is a second need arising for that (and I would not place that in GuiView but in GuiApplication). On a related note we have WorkArea::scheduleRedraw() that was created for the purpose of delayed screen updates (scheduled to happen at next cursor blink). I guess you can something similar for the scrollbar updates. In general I prefer explicit rather than implicit.

Abdel.

Reply via email to