mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-04-07 17:42:35 +02:00
fix some station workflow issues
This commit is contained in:
parent
c915d76255
commit
dfc57b156f
@ -92,6 +92,7 @@ DynamicWidget::DynamicWidget( const Tomahawk::dynplaylist_ptr& playlist, QWidget
|
||||
|
||||
connect( PlaylistManager::instance(), SIGNAL( playClicked() ), this, SLOT( playPressed() ) );
|
||||
connect( PlaylistManager::instance(), SIGNAL( pauseClicked() ), this, SLOT( pausePressed() ) );
|
||||
connect( AudioEngine::instance(), SIGNAL( playlistChanged( PlaylistInterface* ) ), this, SLOT( playlistStopped( PlaylistInterface* ) ) );
|
||||
}
|
||||
|
||||
DynamicWidget::~DynamicWidget()
|
||||
@ -207,18 +208,22 @@ DynamicWidget::layoutFloatingWidgets()
|
||||
}
|
||||
|
||||
void
|
||||
DynamicWidget::hideEvent( QHideEvent* ev )
|
||||
DynamicWidget::playlistStopped( PlaylistInterface* pl )
|
||||
{
|
||||
if( pl == static_cast< PlaylistInterface* >( m_view->proxyModel() ) ) // same playlist, so don't stop
|
||||
return;
|
||||
|
||||
// user started playing something somewhere else, so give it a rest
|
||||
if( m_runningOnDemand ) {
|
||||
stopStation( false );
|
||||
m_model->clear();
|
||||
}
|
||||
QWidget::hideEvent( ev );
|
||||
}
|
||||
|
||||
void
|
||||
DynamicWidget::showEvent(QShowEvent* )
|
||||
{
|
||||
if( !m_playlist.isNull() ) {
|
||||
if( !m_playlist.isNull() && !m_runningOnDemand ) {
|
||||
m_setup->fadeIn();
|
||||
}
|
||||
}
|
||||
|
@ -67,7 +67,6 @@ public:
|
||||
|
||||
virtual QSize sizeHint() const;
|
||||
virtual void resizeEvent( QResizeEvent* );
|
||||
virtual void hideEvent(QHideEvent* );
|
||||
virtual void showEvent(QShowEvent* );
|
||||
|
||||
static void paintRoundedFilledRect( QPainter& p, QPalette& pal, QRect& r, qreal opacity = .95 );
|
||||
@ -90,6 +89,8 @@ public slots:
|
||||
void pausePressed();
|
||||
void stationFailed( const QString& );
|
||||
|
||||
void playlistStopped( PlaylistInterface* );
|
||||
|
||||
private slots:
|
||||
void generate( int = -1 );
|
||||
void tracksGenerated( const QList< Tomahawk::query_ptr>& queries );
|
||||
|
Loading…
x
Reference in New Issue
Block a user