[vlmc-devel] [PATCH] TracksRuler: Use the optimized update()

Hugo Beauzée-Luyssen hugo at beauzee.fr
Wed Jun 29 14:23:57 CEST 2016


On 06/29/2016 02:12 PM, Yikai Lu wrote:
> I have no problem with this. Could someone tell me how to reproduce the bug?
>
> ---
>  src/Gui/timeline/TracksRuler.cpp | 9 ++-------
>  1 file changed, 2 insertions(+), 7 deletions(-)
>
> diff --git a/src/Gui/timeline/TracksRuler.cpp b/src/Gui/timeline/TracksRuler.cpp
> index 3ed010a..216f4ed 100644
> --- a/src/Gui/timeline/TracksRuler.cpp
> +++ b/src/Gui/timeline/TracksRuler.cpp
> @@ -102,13 +102,8 @@ TracksRuler::setDuration( int duration )
>      int oldDuration = m_duration;
>      m_duration = duration;
>
> -    Q_UNUSED( oldDuration );
> -    //FIXME The optimized update() version cause wrong values to be shown in
> -    //the ruler. I don't understand what's happening here.
> -
> -    /*update( ( int ) ( qMin( oldDuration, m_duration ) * m_factor - 1 - m_offset ), 0,
> -            ( int ) ( qAbs( oldDuration - m_duration ) * m_factor + 2 ), height() );*/
> -    update();
> +    update( ( int ) ( qMin( oldDuration, m_duration ) * m_factor - 1 - m_offset ), 0,
> +            ( int ) ( qAbs( oldDuration - m_duration ) * m_factor + 2 ), height() );
>  }
>
>  void
>

This is a workaround from a time we were using Qt 4.4 IIRC, I think you 
can commit this, if somebody complains we'll think about reintroducing 
the workaround.


More information about the Vlmc-devel mailing list