1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-07-31 03:10:12 +02:00

Only emit a rename signal if we are the currently active view. Fixes TWK-202.

This commit is contained in:
Leo Franchi
2011-05-28 17:29:29 -04:00
parent f03e74c777
commit d61f38a206
2 changed files with 5 additions and 2 deletions

View File

@@ -424,6 +424,7 @@ DynamicWidget::onDeleted()
void void
DynamicWidget::onChanged() DynamicWidget::onChanged()
{ {
if( !m_playlist.isNull() ) if( !m_playlist.isNull() &&
ViewManager::instance()->currentPage() == this )
emit nameChanged( m_playlist->title() ); emit nameChanged( m_playlist->title() );
} }

View File

@@ -24,6 +24,7 @@
#include "playlist/playlistproxymodel.h" #include "playlist/playlistproxymodel.h"
#include "widgets/overlaywidget.h" #include "widgets/overlaywidget.h"
#include "viewmanager.h"
using namespace Tomahawk; using namespace Tomahawk;
@@ -186,6 +187,7 @@ PlaylistView::onDeleted()
void void
PlaylistView::onChanged() PlaylistView::onChanged()
{ {
if ( m_model && !m_model->playlist().isNull() ) if ( m_model && !m_model->playlist().isNull() &&
ViewManager::instance()->currentPage() == this )
emit nameChanged( m_model->playlist()->title() ); emit nameChanged( m_model->playlist()->title() );
} }