[vlc-commits] qt: hide all empty groupboxes

Lyndon Brown git at videolan.org
Sat Sep 19 12:45:06 CEST 2020


vlc | branch: master | Lyndon Brown <jnqnfe at gmail.com> | Sun Apr 21 05:44:20 2019 +0100| [9214590343c9b8d55a88efaa3ca1f3c16109d553] | committer: Jean-Baptiste Kempf

qt: hide all empty groupboxes

if a panel only has one groupbox and it is empty, it was hidden, but
otherwise they were shown; this was surely a bug, and at any rate is
undesirably messy. all empty groupboxes are now hidden.

an example case: this fixes the empty "Performance options" groupbox (on
my system) under the top-level "Advanced" tree node in the advanced
preferences view, which happens to be very visible as the first panel
shown when switching to advanced mode.

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

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

 modules/gui/qt/dialogs/preferences/complete_preferences.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/gui/qt/dialogs/preferences/complete_preferences.cpp b/modules/gui/qt/dialogs/preferences/complete_preferences.cpp
index 20140271aa..eb8a3e0bff 100644
--- a/modules/gui/qt/dialogs/preferences/complete_preferences.cpp
+++ b/modules/gui/qt/dialogs/preferences/complete_preferences.cpp
@@ -694,13 +694,14 @@ AdvPrefsPanel::AdvPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
 
         if( p_item->i_type == CONFIG_SECTION )
         {
-            if( box )
+            if( box && i_boxline > 0 )
             {
                 box->setLayout( boxlayout );
                 box->show();
                 layout->addWidget( box, i_line, 0, 1, -1 );
                 i_line++;
             }
+            i_boxline = 0;
             box = new QGroupBox( qtr( p_item->psz_text ), this );
             box->hide();
             boxlayout = new QGridLayout();



More information about the vlc-commits mailing list