Commit 3f933749 authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen

ClipRenderer/PreviewWidget: Fixed regression introduced in previous commit

Fixed some slots name at the same time.
parent 5912bd9f
......@@ -86,11 +86,11 @@ ImportController::ImportController(QWidget *parent) :
connect( m_ui->forwardButton, SIGNAL( clicked() ),
this, SLOT( forwardButtonClicked() ) );
connect( m_mediaListView, SIGNAL( clipSelected( Clip* ) ),
connect( this, SIGNAL( clipSelected( Clip* ) ),
qobject_cast<const ClipRenderer*>( m_preview->getGenericRenderer() ),
SLOT( setClip( Clip* ) ) );
connect( m_mediaListView, SIGNAL( clipSelected( Clip* ) ),
this, SLOT( mediaSelection( Clip* ) ) );
this, SLOT( clipSelection( Clip* ) ) );
connect( m_mediaListView, SIGNAL( clipDeleted( const QUuid& ) ),
qobject_cast<const ClipRenderer*>( m_preview->getGenericRenderer() ),
SLOT( clipUnloaded( const QUuid& ) ) );
......@@ -122,7 +122,7 @@ ImportController::changeEvent( QEvent *e )
}
void
ImportController::mediaSelection( Clip* clip )
ImportController::clipSelection( Clip* clip )
{
const QUuid& uuid = clip->uuid();
if ( m_currentUuid == uuid )
......
......@@ -85,9 +85,9 @@ class ImportController : public QDialog
public slots:
void accept();
void reject();
void mediaSelection( Clip* clip );
private slots:
void clipSelection( Clip* clip );
void forwardButtonClicked();
void treeViewClicked( const QModelIndex& index );
void treeViewDoubleClicked( const QModelIndex& index );
......
......@@ -59,12 +59,20 @@ ClipRenderer::~ClipRenderer()
void
ClipRenderer::setClip( Clip* clip )
{
if ( clip == NULL || clip->length() == 0 )
if ( clip == NULL )
{
m_selectedClip = NULL;
return ;
}
m_selectedClip = clip;
if ( clip->length() == 0 )
return ;
updateInfos( clip );
}
void
ClipRenderer::updateInfos( Clip* clip )
{
m_begin = clip->begin();
m_end = clip->end();
if ( m_isRendering == true )
......@@ -78,6 +86,7 @@ ClipRenderer::startPreview()
{
if ( m_selectedClip == NULL )
return ;
updateInfos( m_selectedClip );
//If an old media is found, we delete it, and disconnect
if ( m_vlcMedia != NULL )
......
......@@ -79,6 +79,7 @@ public slots:
void clipUnloaded( const QUuid& uuid );
void clipUnloaded( const Clip* clip );
virtual void previewWidgetCursorChanged( qint64 newFrame );
void updateInfos( Clip* clip );
/**
* \brief Triggered at every libvlc_MediaPlayerTimeChanged event.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment