[vlc-commits] qt: don't hide playing video when docking playlist

Pierre Lamot git at videolan.org
Fri Nov 3 15:39:55 CET 2017


vlc | branch: master | Pierre Lamot <pierre at videolabs.io> | Fri Nov  3 14:32:43 2017 +0100| [fc1170f0959199489a5e0e226e8ab36bd223f630] | committer: Jean-Baptiste Kempf

qt: don't hide playing video when docking playlist

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fc1170f0959199489a5e0e226e8ab36bd223f630
---

 modules/gui/qt/main_interface.cpp | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/modules/gui/qt/main_interface.cpp b/modules/gui/qt/main_interface.cpp
index e42192ff7b..fc49683777 100644
--- a/modules/gui/qt/main_interface.cpp
+++ b/modules/gui/qt/main_interface.cpp
@@ -632,6 +632,9 @@ inline void MainInterface::showTab( QWidget *widget )
                  stackCentralW->indexOf( stackCentralOldWidget ) );
     msg_Dbg( p_intf, "ShowTab request for %s", widget->metaObject()->className() );
 #endif
+    if ( stackCentralW->currentWidget() == widget )
+        return;
+
     /* fixing when the playlist has been undocked after being hidden.
        restoreStackOldWidget() is called when video stops but
        stackCentralOldWidget would still be pointing to playlist */
@@ -1034,7 +1037,7 @@ void MainInterface::dockPlaylist( bool p_docked )
         playlistVisible = playlistWidget->isVisible();
         stackCentralW->removeWidget( playlistWidget );
         dialog->importPlaylistWidget( playlistWidget );
-        if (THEMIM->getIM()->hasVideo())
+        if ( videoWidget && THEMIM->getIM()->hasVideo() )
             showTab(videoWidget);
         else
             showTab(bgWidget);
@@ -1042,7 +1045,7 @@ void MainInterface::dockPlaylist( bool p_docked )
     }
     else /* Previously undocked */
     {
-        playlistVisible = dialog->isVisible();
+        playlistVisible = dialog->isVisible() && !( videoWidget && THEMIM->getIM()->hasVideo() );
         dialog->hide();
         playlistWidget = dialog->exportPlaylistWidget();
         stackCentralW->addWidget( playlistWidget );



More information about the vlc-commits mailing list