Commit 251f5370 authored by Clement CHAVANCE's avatar Clement CHAVANCE

removed useless optimisation

parent 8ead20b7
...@@ -37,6 +37,7 @@ MediaListViewController::~MediaListViewController() ...@@ -37,6 +37,7 @@ MediaListViewController::~MediaListViewController()
{ {
delete m_cells; delete m_cells;
} }
void MediaListViewController::newMediaLoaded( const QUuid& uuid ) void MediaListViewController::newMediaLoaded( const QUuid& uuid )
{ {
Media* media = Library::getInstance()->media( uuid ); Media* media = Library::getInstance()->media( uuid );
...@@ -109,16 +110,13 @@ void MediaListViewController::showClipList( const QUuid& uuid ) ...@@ -109,16 +110,13 @@ void MediaListViewController::showClipList( const QUuid& uuid )
if ( Library::getInstance()->media( uuid ) == NULL || if ( Library::getInstance()->media( uuid ) == NULL ||
Library::getInstance()->media( uuid )->clips()->size() == 0 ) Library::getInstance()->media( uuid )->clips()->size() == 0 )
return ; return ;
if ( m_lastUuidClipListAsked != uuid ) m_lastUuidClipListAsked = uuid;
{ if ( m_clipsListView != 0 )
m_lastUuidClipListAsked = uuid; delete m_clipsListView;
if ( m_clipsListView != 0 ) m_clipsListView = new ClipListViewController( m_nav, uuid );
delete m_clipsListView; m_clipsListView->addClipsFromMedia( Library::getInstance()->media( uuid ) );
m_clipsListView = new ClipListViewController( m_nav, uuid ); connect( m_clipsListView, SIGNAL( clipSelected( const QUuid& ) ),
m_clipsListView->addClipsFromMedia( Library::getInstance()->media( uuid ) ); this, SLOT( clipSelection( const QUuid& ) ) );
connect( m_clipsListView, SIGNAL( clipSelected( const QUuid& ) ),
this, SLOT( clipSelection( const QUuid& ) ) );
}
m_nav->pushViewController( m_clipsListView ); m_nav->pushViewController( m_clipsListView );
} }
...@@ -132,7 +130,9 @@ void MediaListViewController::newClipAdded( Clip* clip ) ...@@ -132,7 +130,9 @@ void MediaListViewController::newClipAdded( Clip* clip )
{ {
MediaCellView* cell = qobject_cast<MediaCellView*>( m_cells->value( uuid, 0 ) ); MediaCellView* cell = qobject_cast<MediaCellView*>( m_cells->value( uuid, 0 ) );
if ( cell != 0 ) if ( cell != 0 )
{
cell->incrementClipCount(); cell->incrementClipCount();
}
} }
} }
......
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