Commit dca03dbb authored by Geoffroy Lacarriere's avatar Geoffroy Lacarriere

[Import]: Refactor:

Bug fix: seg fault on selecting an new item when the previous was deleted.
parent f6c589d7
......@@ -196,9 +196,13 @@ void ImportController::accept()
void ImportController::mediaDeletion( const QUuid& uuid )
{
m_mediaListController->removeMedia( uuid );
m_model->getMedias()->remove( uuid );
delete m_model->getMedias()->take( uuid );
if ( uuid == m_currentUuid )
{
setUIMetaData( NULL );
m_currentUuid = QUuid();
//m_preview->stop();
}
}
void ImportController::clipDeletion( const QUuid& uuid )
......@@ -208,7 +212,7 @@ void ImportController::clipDeletion( const QUuid& uuid )
foreach(id, m_model->getMedias()->keys() )
{
Media* media = m_model->getMedias()->value( id );
if (media->clip( uuid) );
if (media->clip( uuid) )
media->removeClip( uuid );
}
}
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