[vlmc-devel] [PATCH] while resetting settings Reset only current widget settings

Hugo Beauzée-Luyssen hugo at beauzee.fr
Thu Mar 24 13:23:56 CET 2016


On 03/17/2016 12:56 AM, Sanket Markan wrote:
> ---
>   src/Gui/settings/SettingsDialog.cpp | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/Gui/settings/SettingsDialog.cpp b/src/Gui/settings/SettingsDialog.cpp
> index 5aa086a..340b960 100644
> --- a/src/Gui/settings/SettingsDialog.cpp
> +++ b/src/Gui/settings/SettingsDialog.cpp
> @@ -111,8 +111,8 @@ SettingsDialog::buttonClicked( QAbstractButton *button )
>                                           tr( "This will restore all settings default value.\nAre you sure you want to continue?" ),
>                                           QMessageBox::Ok | QMessageBox::Cancel, QMessageBox::Cancel ) == QMessageBox::Ok )
>               {
> -                for ( int i = 0; i < m_stackedLayout->count(); ++i )
> -                    qobject_cast<PreferenceWidget*>( m_stackedLayout->widget( i ) )->reset();
> +                int i = m_stackedLayout -> currentIndex();
> +                qobject_cast<PreferenceWidget*>( m_stackedLayout->widget( i ) )->reset();
>               }
>               break ;
>           }
>

That might make sense, I'm not sure what's the usual user expectation here.
Felix, any opinion?


More information about the Vlmc-devel mailing list