From: j-b-m Date: Fri, 13 Nov 2009 21:08:56 +0000 (+0100) Subject: Fix typewriter start param X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=096f239902554f85a5d0cc88b1a0895dccebf855;p=mlt Fix typewriter start param --- diff --git a/src/modules/qimage/kdenlivetitle_wrapper.cpp b/src/modules/qimage/kdenlivetitle_wrapper.cpp index 9792d471..2d96969b 100755 --- a/src/modules/qimage/kdenlivetitle_wrapper.cpp +++ b/src/modules/qimage/kdenlivetitle_wrapper.cpp @@ -406,7 +406,7 @@ void drawKdenliveTitle( producer_ktitle self, mlt_frame frame, int width, int he // typewriter effect has 2 param values: // the keystroke delay and a start offset, both in frames QStringList values = params.at( 2 ).split( ";" ); - int interval = qMax( 0, ( ( int ) position) / values.at( 0 ).toInt() - values.at( 1 ).toInt() ); + int interval = qMax( 0, ( ( int ) position - values.at( 1 ).toInt()) / values.at( 0 ).toInt() ); QTextDocument *td = new QTextDocument( params.at( 1 ).left( interval ) ); td->setDefaultFont( titem->font() ); td->setDefaultTextOption( titem->document()->defaultTextOption() );