Skip to content
Snippets Groups Projects
Commit fea4e542 authored by luyikei's avatar luyikei Committed by Hugo Beauzée-Luyssen
Browse files

Search Clip by UUID


Signed-off-by: default avatarHugo Beauzée-Luyssen <hugo@beauzee.fr>
parent d5f01cae
No related branches found
No related tags found
No related merge requests found
......@@ -56,18 +56,16 @@ MediaContainer::clip( const QUuid& uuid )
Clip*
MediaContainer::clip( const QString &uuid )
{
MediaContainer *mc = this;
Clip *clip = nullptr;
QStringList ids = uuid.split( '/' );
foreach ( QString id, ids )
{
clip = mc->clip( QUuid( id ) );
if ( clip == nullptr )
return nullptr;
mc = clip->getChilds();
}
return clip;
for ( const auto& clip : m_clips )
if ( clip->uuid().toString() == uuid )
return clip;
else
{
auto c = clip->getChilds()->clip( uuid );
if ( c != nullptr )
return c;
}
return nullptr;
}
void
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment