--- a/src/eric7/MicroPython/MicroPythonFileManagerWidget.py Tue Feb 14 18:10:30 2023 +0100 +++ b/src/eric7/MicroPython/MicroPythonFileManagerWidget.py Wed Feb 15 15:55:37 2023 +0100 @@ -74,8 +74,10 @@ self.saveButton.setIcon(EricPixmapCache.getIcon("fileSave")) self.saveAsButton.setIcon(EricPixmapCache.getIcon("fileSaveAs")) - self.deviceUpButton.setEnabled(not self.__repl.isMicrobit()) - self.deviceHomeButton.setEnabled(not self.__repl.isMicrobit()) + isMicrobitDeviceWithMPy = self.__repl.isMicrobit() + + self.deviceUpButton.setEnabled(not isMicrobitDeviceWithMPy) + self.deviceHomeButton.setEnabled(not isMicrobitDeviceWithMPy) self.putButton.setEnabled(False) self.putAsButton.setEnabled(False) @@ -140,7 +142,7 @@ act.triggered[bool].connect(self.__localHiddenChanged) self.__deviceMenu = QMenu(self) - if not self.__repl.isMicrobit(): + if not isMicrobitDeviceWithMPy: self.__deviceMenu.addAction( self.tr("Change Directory"), self.__changeDeviceDirectory ) @@ -163,7 +165,7 @@ act.setCheckable(True) act.setChecked(Preferences.getMicroPython("ShowHiddenDevice")) act.triggered[bool].connect(self.__deviceHiddenChanged) - if not parent.isMicrobit(): + if not isMicrobitDeviceWithMPy: self.__deviceMenu.addSeparator() self.__deviceMenu.addAction( self.tr("Show Filesystem Info"), self.__showFileSystemInfo