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

TracksView: Removing useless method.

parent 533f860c
......@@ -654,7 +654,8 @@ TracksView::removeMediaItem( TrackWorkflow *tw, const QUuid &uuid )
{
AbstractGraphicsMediaItem *item =
dynamic_cast<AbstractGraphicsMediaItem*>( trackItems.at( i ) );
if ( !item || item->uuid() != uuid ) continue;
if ( !item || item->uuid() != uuid )
continue;
removeMediaItem( item );
}
}
......@@ -662,31 +663,9 @@ TracksView::removeMediaItem( TrackWorkflow *tw, const QUuid &uuid )
void
TracksView::removeMediaItem( AbstractGraphicsMediaItem *item )
{
QList<AbstractGraphicsMediaItem*> items;
items.append( item );
removeMediaItem( items );
delete item;
m_clipsLoaded.remove( item->clipHelper()->uuid() );
}
void
TracksView::removeMediaItem( const QList<AbstractGraphicsMediaItem*> &items )
{
bool needUpdate = false;
for ( int i = 0; i < items.size(); ++i )
{
GraphicsMovieItem *movieItem = qgraphicsitem_cast<GraphicsMovieItem*>( items.at( i ) );
if ( !movieItem )
{
//TODO add support for audio tracks
qWarning() << tr( "Action not supported." );
continue;
}
delete movieItem;
needUpdate = true;
}
if ( needUpdate ) updateDuration();
updateDuration();
}
void
......
......@@ -159,12 +159,6 @@ public:
* \sa mediaItems( const QPoint& pos )
*/
QList<AbstractGraphicsItem*> timelineItems();
/**
* \brief Remove multiple items from the timeline.
* \param items A QList of pointers to AbstractGraphicsMediaItem.
* \sa removeMediaItem( AbstractGraphicsMediaItem* )
*/
void removeMediaItem( const QList<AbstractGraphicsMediaItem*> &items );
/**
* \brief Change the currently selected tool.
* \param button The selected tool button.
......
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