src/eric7/Preferences/ConfigurationPages/MicroPythonPage.py

branch
eric7
changeset 9498
d48061567354
parent 9496
05017f795c24
child 9624
b47dfa7a137d
diff -r 8beca4047c53 -r d48061567354 src/eric7/Preferences/ConfigurationPages/MicroPythonPage.py
--- a/src/eric7/Preferences/ConfigurationPages/MicroPythonPage.py	Wed Nov 09 10:59:01 2022 +0100
+++ b/src/eric7/Preferences/ConfigurationPages/MicroPythonPage.py	Wed Nov 09 11:22:02 2022 +0100
@@ -21,7 +21,6 @@
     QChart = None
 
 
-# TODO: add option to enable/disable manual device selection
 class MicroPythonPage(ConfigurationPageBase, Ui_MicroPythonPage):
     """
     Class implementing the MicroPython configuration page.
@@ -86,6 +85,11 @@
             )
         )
 
+        # devices parameters
+        self.manualSelectionCheckBox.setChecked(
+            Preferences.getMicroPython("EnableManualDeviceSelection")
+        )
+
         # serial link parameters
         self.timeoutSpinBox.setValue(
             Preferences.getMicroPython("SerialTimeout") // 1000
@@ -166,6 +170,11 @@
         # workspace
         Preferences.setMicroPython("MpyWorkspace", self.workspacePicker.text())
 
+        # devices parameters
+        Preferences.setMicroPython(
+            "EnableManualDeviceSelection", self.manualSelectionCheckBox.isChecked()
+        )
+
         # serial link parameters
         Preferences.setMicroPython("SerialTimeout", self.timeoutSpinBox.value() * 1000)
         # converted to milliseconds

eric ide

mercurial