mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-25 02:09:48 +01:00
* Fixed TWK-1096: Deleting a playlist destroys the current view.
This commit is contained in:
parent
d5798d0614
commit
3062e6d2bd
@ -144,6 +144,8 @@ FlexibleView::setDetailedView( TrackView* view )
|
||||
delete m_detailedView;
|
||||
}
|
||||
|
||||
connect( view, SIGNAL( destroyed( QWidget* ) ), SLOT( onWidgetDestroyed( QWidget* ) ), Qt::UniqueConnection );
|
||||
|
||||
view->setPlaylistInterface( m_playlistInterface );
|
||||
|
||||
m_detailedView = view;
|
||||
@ -289,4 +291,12 @@ FlexibleView::setPixmap( const QPixmap& pixmap )
|
||||
m_header->setPixmap( pixmap );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
FlexibleView::onWidgetDestroyed( QWidget* widget )
|
||||
{
|
||||
emit destroyed( this );
|
||||
}
|
||||
|
||||
|
||||
#include "FlexibleView.moc"
|
||||
|
@ -72,8 +72,10 @@ public slots:
|
||||
|
||||
signals:
|
||||
void modeChanged( FlexibleViewMode mode );
|
||||
void destroyed( QWidget* widget );
|
||||
|
||||
private slots:
|
||||
void onWidgetDestroyed( QWidget* widget );
|
||||
|
||||
private:
|
||||
FlexibleHeader* m_header;
|
||||
|
@ -73,9 +73,6 @@ void
|
||||
PlaylistView::keyPressEvent( QKeyEvent* event )
|
||||
{
|
||||
TrackView::keyPressEvent( event );
|
||||
|
||||
if ( !model() )
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@ -124,7 +121,6 @@ PlaylistView::updaters() const
|
||||
void
|
||||
PlaylistView::onDeleted()
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
emit destroyed( widget() );
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user