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

yikei lu luyikei.qmltu at gmail.com
Wed Jun 29 14:45:15 CEST 2016


Pushed. Thanks!

2016-06-29 21:38 GMT+09:00 Ludovic Fauvet <etix at videolan.org>:
> On Wed, Jun 29, 2016, at 14:12, 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
>> --
>> 1.9.1
>
> After a quick check to the file history (from 7 year ago!), Hugo seems
> right. My best guess is that there was a regression in the Qt version we
> were using at  the time causing artefacts because the updated region was
> wrong. If it works now, you can safely restore the code and push.
>
> Best,
> --
> Ludovic Fauvet
> www.videolan.org
> _______________________________________________
> Vlmc-devel mailing list
> Vlmc-devel at videolan.org
> https://mailman.videolan.org/listinfo/vlmc-devel


More information about the Vlmc-devel mailing list