equal
deleted
inserted
replaced
320 */ |
320 */ |
321 void MpMainWindow::handleLibraryUpdated() |
321 void MpMainWindow::handleLibraryUpdated() |
322 { |
322 { |
323 TX_ENTRY |
323 TX_ENTRY |
324 |
324 |
325 // If library changed while playing back, always return to AllSongs collection view. |
325 // Data might have changed, so other views than Collection or MediaWall are not valid any more. |
326 if ( mPlaybackViewPlugin && |
326 if ( mCurrentViewPlugin == mMediaWallViewPlugin ) { |
327 mCurrentViewPlugin == mPlaybackViewPlugin && |
327 if ( mVerticalViewType != CollectionView ) { |
328 mCollectionViewPlugin ) { |
328 mVerticalViewType = CollectionView; |
329 |
329 } |
|
330 } |
|
331 else if ( mCollectionViewPlugin && mCurrentViewPlugin != mCollectionViewPlugin ) { |
330 activateView( CollectionView ); |
332 activateView( CollectionView ); |
331 MpViewBase* collectionView = reinterpret_cast<MpViewBase*>(mCollectionViewPlugin->getView()); |
333 MpViewBase* collectionView = reinterpret_cast<MpViewBase*>(mCollectionViewPlugin->getView()); |
332 collectionView->setDefaultView(); |
334 collectionView->setDefaultView(); |
333 } |
335 } |
334 |
336 |
521 void MpMainWindow::loadActivity( QVariant data ) |
523 void MpMainWindow::loadActivity( QVariant data ) |
522 { |
524 { |
523 TX_ENTRY |
525 TX_ENTRY |
524 QVariantHash activityData = data.toHash(); |
526 QVariantHash activityData = data.toHash(); |
525 QByteArray serializedRestorePath = activityData.value( "restorePath" ).toByteArray(); |
527 QByteArray serializedRestorePath = activityData.value( "restorePath" ).toByteArray(); |
|
528 connect( MpEngineFactory::sharedEngine(), SIGNAL( restorePathFailed() ), this, SLOT( handleRestorePathFailed() ) ); |
526 MpEngineFactory::sharedEngine()->loadActivityData( serializedRestorePath ); |
529 MpEngineFactory::sharedEngine()->loadActivityData( serializedRestorePath ); |
527 TX_EXIT |
530 TX_EXIT |
528 } |
531 } |
529 |
532 |