1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-07-31 11:20:22 +02:00

* OverlayWidget uses PlayableProxyModel now.

This commit is contained in:
Christian Muehlhaeuser
2012-06-01 00:34:05 +02:00
parent 657b4b18f8
commit 77b4e62918

View File

@@ -22,6 +22,7 @@
#include <QPainter> #include <QPainter>
#include <QPropertyAnimation> #include <QPropertyAnimation>
#include "PlayableProxyModel.h"
#include "utils/Logger.h" #include "utils/Logger.h"
#define CORNER_ROUNDNESS 8.0 #define CORNER_ROUNDNESS 8.0
@@ -98,7 +99,7 @@ OverlayWidget::show( int timeoutSecs )
animation->setEndValue( 1.0 ); animation->setEndValue( 1.0 );
animation->start(); animation->start();
if( timeoutSecs > 0 ) if ( timeoutSecs > 0 )
m_timer.start( timeoutSecs * 1000 ); m_timer.start( timeoutSecs * 1000 );
} }
@@ -129,7 +130,8 @@ OverlayWidget::shown() const
void void
OverlayWidget::onViewChanged() OverlayWidget::onViewChanged()
{ {
if ( m_parent->model()->rowCount() ) PlayableProxyModel* model = qobject_cast<PlayableProxyModel*>( m_parent->model() );
if ( model && ( model->rowCount( QModelIndex() ) || model->isLoading() ) )
{ {
hide(); hide();
} }