Repository: spyder-ide/spyder

Issue:
Settings not getting applied
<!--- **PLEASE READ:** When submitting here, please ensure you've completed the following checklist and checked the boxes to confirm. Issue reports without it may be closed. Thanks! --->

### Issue Report Checklist

* [x] Searched the [issues page](https://github.com/spyder-ide/spyder/issues?q=is%3Aissue) for similar reports
* [x] Tried basic troubleshooting (if a bug/error)
* [x] Completed the **Problem Description**, **Steps to Reproduce** and **Version** sections below


## Problem Description

![settings](https://user-images.githubusercontent.com/16781833/62096316-e328c480-b248-11e9-8ecb-7d2fd8d776c5.gif)


### What steps reproduce the problem?

1. Change some preferences (without triggering a restart).
2. The new settings doesn't get applied


## Versions
<!--- You can get this information from Help > About Spyder...
or (if Spyder won't launch) the "conda list" command
from the Anaconda Prompt/Terminal/command line. --->

* Spyder version: 4.0.0dev0
* Python version: 3.6.8
* Qt version: 5.9.6
* PyQt version: 5.9.2
* Operating System name/version: Windows 10




Discussion:
@dalthviz will fix it!
@dalthviz is this only on the editor preferences?

--- 

Update: So I think the preferences are working only for the general ones and not the plugin one. I found the issue. Submitting a PR early tomorrow morning
Great, thanks a lot @goanpeca!

Resolving patch:
diff --git a/spyder/plugins/editor/plugin.py b/spyder/plugins/editor/plugin.py
--- a/spyder/plugins/editor/plugin.py
+++ b/spyder/plugins/editor/plugin.py
@@ -2643,7 +2643,8 @@ def apply_plugin_settings(self, options):
                 if name in options:
                     state = self.get_option(name)
                     action.setChecked(state)
-                    action.trigger()
+                    # See: spyder-ide/spyder#9915
+                    # action.trigger()
 
             # Multiply by 1000 to convert seconds to milliseconds
             self.autosave.interval = (
diff --git a/spyder/preferences/configdialog.py b/spyder/preferences/configdialog.py
--- a/spyder/preferences/configdialog.py
+++ b/spyder/preferences/configdialog.py
@@ -309,11 +309,10 @@ def is_valid(self):
         return True
 
     def load_from_conf(self):
-        """Load settings from configuration file"""
+        """Load settings from configuration file."""
         for checkbox, (option, default) in list(self.checkboxes.items()):
             checkbox.setChecked(self.get_option(option, default))
-            # QAbstractButton works differently for PySide and PyQt
-            checkbox.clicked.connect(lambda opt=option:
+            checkbox.clicked.connect(lambda _, opt=option:
                                      self.has_been_modified(opt))
         for radiobutton, (option, default) in list(self.radiobuttons.items()):
             radiobutton.setChecked(self.get_option(option, default))
@@ -326,7 +325,7 @@ def load_from_conf(self):
             if getattr(lineedit, 'content_type', None) == list:
                 data = ', '.join(data)
             lineedit.setText(data)
-            lineedit.textChanged.connect(lambda _foo, opt=option:
+            lineedit.textChanged.connect(lambda _, opt=option:
                                          self.has_been_modified(opt))
             if lineedit.restart_required:
                 self.restart_options[option] = lineedit.label_text


Test patch: