Commit 5ba43a3b authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen
Browse files

Updating filter when changing tab

Removed debug
parent 30684a04
......@@ -44,6 +44,7 @@ LibraryWidget::LibraryWidget( QWidget *parent ) : QWidget( parent ), m_firstDire
LibraryWidget::m_medias = new QList<ListViewMediaItem*>();
connect( m_ui.filterInput, SIGNAL( textChanged( QString ) ), this, SLOT( updateFilter( QString ) ) );
connect( m_ui.clearFilterButton, SIGNAL( clicked() ), m_ui.filterInput, SLOT( clear() ) );
connect( m_ui.LibraryTabs, SIGNAL( currentChanged( int ) ), this, SLOT( tabChanged( int ) ) );
}
LibraryWidget::~LibraryWidget()
......@@ -230,7 +231,6 @@ const MediaListWidget* LibraryWidget::getAudioListWidget() const
void LibraryWidget::updateFilter( const QString& filter )
{
qDebug() << "Updating filter with:"<<filter;
QListWidget* mediaList = ( QListWidget* )( m_ui.LibraryTabs->currentWidget()->children().back() );
unsigned int count = mediaList->count();
for ( unsigned int i = 0; i < count; ++i )
......@@ -242,3 +242,8 @@ void LibraryWidget::updateFilter( const QString& filter )
}
}
}
void LibraryWidget::tabChanged( int )
{
updateFilter( m_ui.filterInput->text() );
}
......@@ -77,6 +77,7 @@ public slots:
private slots:
void on_pushButtonAddMedia_clicked();
void on_pushButtonRemoveMedia_clicked();
void tabChanged( int );
signals:
// void listViewMediaAdded(Clip* clip);
......
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