Commit 0c3fb79a authored by Jakob Leben's avatar Jakob Leben

Qt4: fix faulty playlist show / hide logic

Fixes #2899, at least on Linux. Can somebody test on Windows, please?
parent 22da0747
......@@ -132,12 +132,11 @@ void PlaylistWidget::closeEvent( QCloseEvent *event )
if( THEDP->isDying() )
{
/* FIXME is it needed ? */
close();
event->accept();
}
else
{
if( p_intf->p_sys->p_mi )
p_intf->p_sys->p_mi->togglePlaylist();
hide();
event->ignore();
}
event->accept();
}
......@@ -964,7 +964,19 @@ void MainInterface::togglePlaylist()
else
{
/* toggle the visibility of the playlist */
TOGGLEV( playlistWidget );
//TOGGLEV( playlistWidget );
if( playlistWidget->isVisible() && !playlistWidget->isMinimized() )
{
playlistWidget->hide();
}
else
{
playlistWidget->setWindowState(
playlistWidget->windowState() & ~Qt::WindowMinimized | Qt::WindowActive);
playlistWidget->show();
}
playlistVisible = !playlistVisible;
//doComponentsUpdate(); //resize( sizeHint() );
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment