Commit c74b3ca2 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

MediaListView: Update the selected item when an item gets removed (not deleted)

parent 7f7feb73
......@@ -132,13 +132,16 @@ ImportController::changeEvent( QEvent *e )
void
ImportController::clipSelection( Clip* clip )
{
const QUuid& uuid = clip->uuid();
if ( m_currentUuid == uuid )
return ;
m_ui->metadataContainer->setWatchedClip( clip );
m_clipRenderer->stop();
m_currentUuid = uuid;
// m_tag->clipSelected( clip );
if ( clip != NULL )
{
const QUuid& uuid = clip->uuid();
if ( m_currentUuid == uuid )
return ;
m_ui->metadataContainer->setWatchedClip( clip );
m_clipRenderer->stop();
m_currentUuid = uuid;
// m_tag->clipSelected( clip );
}
emit clipSelected( clip );
}
......
......@@ -101,6 +101,8 @@ MediaListView::__clipRemoved( const QUuid &uuid )
MediaCellView* cell = m_cells.take( uuid );
removeCell( cell );
m_currentUuid = QUuid();
// cancel out selection state (mostly to inform the renderer)
emit clipSelected( NULL );
}
void
......
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