Commit 50278f4d authored by Francois Cartegnie's avatar Francois Cartegnie Committed by Rémi Duraffort

Fix advanced panel height saving. Fixes #3858

(cherry picked from commit 374372612fbea4edbe44aefedcb04a85971b8464)
Signed-off-by: default avatarRémi Duraffort <ivoire@videolan.org>
parent c5690de2
...@@ -168,7 +168,10 @@ OpenDialog::OpenDialog( QWidget *parent, ...@@ -168,7 +168,10 @@ OpenDialog::OpenDialog( QWidget *parent,
/* Hide the advancedPanel */ /* Hide the advancedPanel */
if( !var_InheritBool( p_intf, "qt-adv-options" ) ) if( !var_InheritBool( p_intf, "qt-adv-options" ) )
{
ui.advancedFrame->hide(); ui.advancedFrame->hide();
ui.advancedFrame->setEnabled( false );
}
else else
ui.advancedCheckBox->setChecked( true ); ui.advancedCheckBox->setChecked( true );
...@@ -183,7 +186,9 @@ OpenDialog::OpenDialog( QWidget *parent, ...@@ -183,7 +186,9 @@ OpenDialog::OpenDialog( QWidget *parent,
OpenDialog::~OpenDialog() OpenDialog::~OpenDialog()
{ {
getSettings()->setValue( "opendialog-size", size() ); getSettings()->setValue( "opendialog-size", size() -
( ui.advancedFrame->isEnabled() ?
QSize(0, ui.advancedFrame->height()) : QSize(0, 0) ) );
} }
/* Used by VLM dialog and inputSlave selection */ /* Used by VLM dialog and inputSlave selection */
...@@ -246,6 +251,7 @@ void OpenDialog::toggleAdvancedPanel() ...@@ -246,6 +251,7 @@ void OpenDialog::toggleAdvancedPanel()
if( ui.advancedFrame->isVisible() ) if( ui.advancedFrame->isVisible() )
{ {
ui.advancedFrame->hide(); ui.advancedFrame->hide();
ui.advancedFrame->setEnabled( false );
if( size().isValid() ) if( size().isValid() )
resize( size().width(), size().height() resize( size().width(), size().height()
- ui.advancedFrame->height() ); - ui.advancedFrame->height() );
...@@ -253,6 +259,7 @@ void OpenDialog::toggleAdvancedPanel() ...@@ -253,6 +259,7 @@ void OpenDialog::toggleAdvancedPanel()
else else
{ {
ui.advancedFrame->show(); ui.advancedFrame->show();
ui.advancedFrame->setEnabled( true );
if( size().isValid() ) if( size().isValid() )
resize( size().width(), size().height() resize( size().width(), size().height()
+ ui.advancedFrame->height() ); + ui.advancedFrame->height() );
......
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