From aeeaaadcd27b64310a63ff8379c77237778cf18f Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Tue, 12 Jun 2012 07:42:02 +0200 Subject: [PATCH] * Reimplemented ViewManager::pageForInterface. --- src/libtomahawk/ViewManager.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/libtomahawk/ViewManager.cpp b/src/libtomahawk/ViewManager.cpp index 92d594e07..f7b198ba3 100644 --- a/src/libtomahawk/ViewManager.cpp +++ b/src/libtomahawk/ViewManager.cpp @@ -936,14 +936,16 @@ ViewManager::pageForPlaylist(const playlist_ptr& pl) const ViewPage* ViewManager::pageForInterface( Tomahawk::playlistinterface_ptr interface ) const { -/* for ( int i = 0; i < m_pageHistory.count(); i++ ) + QList< Tomahawk::ViewPage* > pages = historyPages(); + + for ( int i = 0; i < pages.count(); i++ ) { - ViewPage* page = m_pageHistory.at( i ); + ViewPage* page = pages.at( i ); if ( page->playlistInterface() == interface ) return page; if ( page->playlistInterface() && page->playlistInterface()->hasChildInterface( interface ) ) return page; - }*/ + } return 0; }