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

Paweł Goliński golpaw1 at gmail.com
Mon Mar 7 03:18:09 CET 2016


The widget was not notified from anywhere about
movie frame changes, connected signal from renderer
to PreviewRuler.
---
 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();
-- 
2.5.4 (Apple Git-61)


More information about the Vlmc-devel mailing list