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 ) ...@@ -132,12 +132,11 @@ void PlaylistWidget::closeEvent( QCloseEvent *event )
if( THEDP->isDying() ) if( THEDP->isDying() )
{ {
/* FIXME is it needed ? */ /* FIXME is it needed ? */
close(); event->accept();
} }
else else
{ {
if( p_intf->p_sys->p_mi ) hide();
p_intf->p_sys->p_mi->togglePlaylist(); event->ignore();
} }
event->accept();
} }
...@@ -964,7 +964,19 @@ void MainInterface::togglePlaylist() ...@@ -964,7 +964,19 @@ void MainInterface::togglePlaylist()
else else
{ {
/* toggle the visibility of the playlist */ /* 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; playlistVisible = !playlistVisible;
//doComponentsUpdate(); //resize( sizeHint() ); //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