[vlmc-devel] Fix clip preview widget's ruler and lcd timer

Paweł Goliński git at videolan.org
Mon Mar 7 13:48:05 CET 2016


vlmc | branch: master | Paweł Goliński <golpaw1 at gmail.com> | Mon Mar  7 03:18:09 2016 +0100| [086c080347ed36cdc2478b68483cf89918ee3257] | committer: Hugo Beauzée-Luyssen

Fix clip preview widget's ruler and lcd timer

The widget was not notified from anywhere about
movie frame changes, connected signal from renderer
to PreviewRuler.

Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>

> https://code.videolan.org/videolan/vlmc/commit/086c080347ed36cdc2478b68483cf89918ee3257
---

 src/Gui/preview/PreviewRuler.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/Gui/preview/PreviewRuler.cpp b/src/Gui/preview/PreviewRuler.cpp
index d17225e..823d1b1 100644
--- a/src/Gui/preview/PreviewRuler.cpp
+++ b/src/Gui/preview/PreviewRuler.cpp
@@ -46,6 +46,8 @@ PreviewRuler::setRenderer( GenericRenderer* renderer )
     }
     m_renderer = renderer;
 
+    connect( m_renderer, SIGNAL( frameChanged( qint64, Vlmc::FrameChangedReason ) ),
+             this, SLOT( updateTimecode( qint64 ) ) );
     connect( m_renderer->eventWatcher(), SIGNAL( stopped() ),
              this, SLOT( clear() ) );
 }
@@ -230,6 +232,7 @@ PreviewRuler::setFrame( qint64 frame, bool broadcastEvent /*= false*/ )
 void
 PreviewRuler::updateTimecode( qint64 frames /*= -1*/ )
 {
+    setFrame( frames );
     if ( m_renderer->length() > 0 )
     {
         int fps = (int)m_renderer->getFps();



More information about the Vlmc-devel mailing list