--- a/eric6/Preferences/ConfigurationPages/MicroPythonPage.py Thu Feb 04 14:35:50 2021 +0100 +++ b/eric6/Preferences/ConfigurationPages/MicroPythonPage.py Thu Feb 04 14:38:01 2021 +0100 @@ -13,6 +13,7 @@ from .Ui_MicroPythonPage import Ui_MicroPythonPage import Preferences +import Utilities from MicroPython.MicroPythonWidget import AnsiColorSchemes @@ -32,6 +33,8 @@ self.setupUi(self) self.setObjectName("MicroPythonPage") + self.workspacePicker.setMode(E5PathPickerModes.DirectoryMode) + self.colorSchemeComboBox.addItems(sorted(AnsiColorSchemes.keys())) # populate the chart theme combobox @@ -66,6 +69,12 @@ self.dfuUtilPathPicker.setFilters(self.tr("All Files (*)")) # set initial values + # workspace + self.workspacePicker.setText( + Utilities.toNativeSeparators( + Preferences.getMicroPython("MpyWorkspace") or + Utilities.getHomeDir())) + # serial link parameters self.timeoutSpinBox.setValue( Preferences.getMicroPython("SerialTimeout") / 1000) @@ -130,6 +139,11 @@ """ Public slot to save the MicroPython configuration. """ + # workspace + Preferences.setMicroPython( + "MpyWorkspace", + self.workspacePicker.text()) + # serial link parameters Preferences.setMicroPython( "SerialTimeout",