@@ -35,7 +35,7 @@ def __init__(self, parent):
35
35
self .listPath = []
36
36
self .lineEdit .setReadOnly (True )
37
37
38
- # self.restoreSettings()
38
+ self .restoreSettings ()
39
39
self .initialCheck ()
40
40
41
41
self .addAPIpath .setIcon (QIcon (":/images/themes/default/symbologyAdd.png" ))
@@ -210,6 +210,7 @@ def restoreSettings(self):
210
210
self .lineEdit .setText (settings .value ("pythonConsole/preparedAPIFile" , "" , type = str ))
211
211
itemTable = settings .value ("pythonConsole/userAPI" , [])
212
212
if itemTable :
213
+ self .tableWidget .setRowCount (0 )
213
214
for i in range (len (itemTable )):
214
215
self .tableWidget .insertRow (i )
215
216
self .tableWidget .setColumnCount (2 )
@@ -221,6 +222,8 @@ def restoreSettings(self):
221
222
222
223
self .autoCompThreshold .setValue (settings .value ("pythonConsole/autoCompThreshold" , 2 , type = int ))
223
224
self .autoCompThresholdEditor .setValue (settings .value ("pythonConsole/autoCompThresholdEditor" , 2 , type = int ))
225
+ self .groupBoxAutoCompletionEditor .setChecked (settings .value ("pythonConsole/autoCompleteEnabledEditor" , True , type = bool ))
226
+ self .groupBoxAutoCompletion .setChecked (settings .value ("pythonConsole/autoCompleteEnabled" , True , type = bool ))
224
227
225
228
self .enableObjectInspector .setChecked (settings .value ("pythonConsole/enableObjectInsp" , False , type = bool ))
226
229
self .autoCloseBracketEditor .setChecked (settings .value ("pythonConsole/autoCloseBracketEditor" , False , type = bool ))
@@ -285,4 +288,5 @@ def _resetFontColorEditor(self):
285
288
# return obj.setButtonBackground()
286
289
287
290
def reject (self ):
291
+ self .restoreSettings ()
288
292
QDialog .reject (self )
0 commit comments