336 |
336 |
337 else: |
337 else: |
338 self.deviceInfoLabel.setText( |
338 self.deviceInfoLabel.setText( |
339 self.tr("No supported devices detected.")) |
339 self.tr("No supported devices detected.")) |
340 |
340 |
|
341 self.__unknownPorts = unknownPorts |
|
342 if self.__unknownPorts: |
|
343 self.connectButton.setEnabled(True) |
|
344 |
341 index = self.deviceTypeComboBox.findText(currentDevice, |
345 index = self.deviceTypeComboBox.findText(currentDevice, |
342 Qt.MatchExactly) |
346 Qt.MatchExactly) |
343 if index == -1: |
347 if index == -1: |
344 # entry is no longer present |
348 # entry is no longer present |
345 index = 0 |
349 index = 0 |
395 self.tr("""Would you like to add them to the list of""" |
399 self.tr("""Would you like to add them to the list of""" |
396 """ manually configured devices?"""), |
400 """ manually configured devices?"""), |
397 yesDefault=True) |
401 yesDefault=True) |
398 if yes: |
402 if yes: |
399 self.__addUnknownDevices(list(newUnknownDevices)) |
403 self.__addUnknownDevices(list(newUnknownDevices)) |
400 |
|
401 self.__unknownPorts = unknownPorts |
|
402 if self.__unknownPorts: |
|
403 self.connectButton.setEnabled(True) |
|
404 |
404 |
405 def __handlePreferencesChanged(self): |
405 def __handlePreferencesChanged(self): |
406 """ |
406 """ |
407 Private slot to handle a change in preferences. |
407 Private slot to handle a change in preferences. |
408 """ |
408 """ |
1022 deviceType, self, vid, pid) |
1022 deviceType, self, vid, pid) |
1023 self.__device.setButtons() |
1023 self.__device.setButtons() |
1024 |
1024 |
1025 self.__lastPort = port |
1025 self.__lastPort = port |
1026 self.__lastDeviceType = deviceType |
1026 self.__lastDeviceType = deviceType |
|
1027 else: |
|
1028 return |
1027 |
1029 |
1028 if self.__interface.connectToDevice(port): |
1030 if self.__interface.connectToDevice(port): |
1029 self.__setConnected(True) |
1031 self.__setConnected(True) |
1030 |
1032 |
1031 if (Preferences.getMicroPython("SyncTimeAfterConnect") and |
1033 if (Preferences.getMicroPython("SyncTimeAfterConnect") and |