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

Sanket Markan sanketmarkan at gmail.com
Thu Mar 17 00:56:47 CET 2016


---
 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 ;
         }
-- 
1.9.1



More information about the Vlmc-devel mailing list