eric6/MicroPython/MicroPythonReplWidget.py

branch
micropython
changeset 7111
62191d1aeeed
parent 7108
4f6133a01c6a
child 7120
89ee83fadec9
equal deleted inserted replaced
7108:4f6133a01c6a 7111:62191d1aeeed
308 self.deviceIconLabel.setPixmap(MicroPythonDevices.getDeviceIcon( 308 self.deviceIconLabel.setPixmap(MicroPythonDevices.getDeviceIcon(
309 deviceType, False)) 309 deviceType, False))
310 310
311 self.__device = MicroPythonDevices.getDevice(deviceType, self) 311 self.__device = MicroPythonDevices.getDevice(deviceType, self)
312 self.__device.setButtons() 312 self.__device.setButtons()
313
314 self.connectButton.setEnabled(bool(deviceType))
313 315
314 @pyqtSlot() 316 @pyqtSlot()
315 def on_checkButton_clicked(self): 317 def on_checkButton_clicked(self):
316 """ 318 """
317 Private slot to check for connected devices. 319 Private slot to check for connected devices.
461 Private slot to connect to the selected device or disconnect from the 463 Private slot to connect to the selected device or disconnect from the
462 currently connected device. 464 currently connected device.
463 """ 465 """
464 if self.__connected: 466 if self.__connected:
465 self.__disconnectFromDevice() 467 self.__disconnectFromDevice()
468
469 self.replButton.setChecked(False)
470 if self.filesButton.isChecked():
471 self.on_filesButton_clicked(False)
472 self.filesButton.setChecked(False)
473 if self.chartButton.isChecked():
474 self.on_chartButton_clicked(False)
475 self.chartButton.setChecked(False)
466 else: 476 else:
467 self.__connectToDevice() 477 self.__connectToDevice()
468 478
469 @pyqtSlot() 479 @pyqtSlot()
470 def __clear(self): 480 def __clear(self):

eric ide

mercurial