On Thu, May 17, 2007 at 02:03:55PM +0200, Peter Kümmel wrote:
> Here a new patch to address Helge's scrolling bug.
> The important comment:
> 
> "We circumvent the event queue for scrolling events.
> This avoids scrolling after the user has stopped
> scrolling, but scrolling proceeds because the
> event queue is full of scroll events.
> We trigger the scrolling by a timer which we
> could stop at any time (we can't clean the
> event queue from scrolling events)"
> 
> 
> I've found no problems on Win and Linux, but it
> should be tested more intensively, so it would be
> good to ship it with beta 3, but I assume I'm too
> late.
> 
> Peter

> Index: src/frontends/qt4/GuiWorkArea.cpp
> ===================================================================
> --- src/frontends/qt4/GuiWorkArea.cpp (revision 18380)
> +++ src/frontends/qt4/GuiWorkArea.cpp (working copy)
> @@ -161,7 +161,7 @@
>  
>  GuiWorkArea::GuiWorkArea(int w, int h, int id, LyXView & lyx_view)
>       : WorkArea(id, lyx_view), need_resize_(false), schedule_redraw_(false),
> -       preedit_lines_(1)
> +       preedit_lines_(1), delayed_scrollbar_sync(*new QTimer(this))

Do you need an explicit timer object? There's QObject::startTimer()
and QObject::timerEvent()...

> Index: src/frontends/qt4/GuiWorkArea.h
> ===================================================================
> --- src/frontends/qt4/GuiWorkArea.h   (revision 18380)
> +++ src/frontends/qt4/GuiWorkArea.h   (working copy)
> @@ -156,6 +156,14 @@
>       /// timer to limit triple clicks
>       void doubleClickTimeout();
>  
> +private Q_SLOTS:
> +     /// process vertical scroll bar event
> +     void verticalScrollBarActionTriggered(int action);
> +     ///
> +     void verticalScrollBarSliderPressed();
> +     ///
> +     void verticalScrollBarSliderReleased();
> +
>  private:
>       /// The slot connected to SyntheticMouseEvent::timeout.
>       void generateSyntheticMouseEvent();
> @@ -177,6 +185,8 @@
>       bool schedule_redraw_;
>       ///
>       int preedit_lines_;
> +     ///
> +     QTimer& delayed_scrollbar_sync;

A _reference_? Why?

Andre'

Reply via email to