Commit ef724196 authored by Thomas Boquet's avatar Thomas Boquet
Browse files

not reemit when same clip selected

parent 486527f1
......@@ -26,7 +26,8 @@
#include "MediaCellView.h"
#include "Library.h"
ListViewController::ListViewController( StackViewController* nav ) : m_nav( nav )
ListViewController::ListViewController( StackViewController* nav ) : m_nav( nav ),
m_currentUuid( 0 )
{
m_title = new QString( "Media List" );
m_scrollArea = new QScrollArea();
......@@ -64,5 +65,11 @@ void ListViewController::addCell( QWidget* cell )
void ListViewController::cellSelected( const QUuid& uuid )
{
emit selectedClipChanged( Library::getInstance()->getClip( uuid ) );
if ( m_currentUuid == 0 || *m_currentUuid != uuid )
{
if ( m_currentUuid != 0 )
delete m_currentUuid;
m_currentUuid = new QUuid( uuid );
emit selectedClipChanged( Library::getInstance()->getClip( uuid ) );
}
}
......@@ -53,6 +53,7 @@ private:
QWidget* m_container;
QVBoxLayout* m_layout;
StackViewController* m_nav;
QUuid* m_currentUuid;
public slots:
void cellSelected( const QUuid& );
......
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