Skip to content

Commit

Permalink
Dont setCurrentIndex on serial port combo
Browse files Browse the repository at this point in the history
Something got weird and then broke (PySide6-Essentials 6.6.1, 6.6.3)
with QComboBox and trying to use the setCurrentIndex slot in another
thread gives

QBasicTimer::start: Timers cannot be started from another thread
QObject::startTimer: Timers cannot be started from another thread

errors when selecting the combo box afterwards. This was just a QoL
feature so just remove it.
  • Loading branch information
julianneswinoga committed Jan 4, 2025
1 parent 2651831 commit c9762c1
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions OATFWGUI/gui_logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,11 +361,6 @@ def pio_refresh_ports_finished(self):
self.main_app.wCombo_serial_port.clear()
for serial_port in self.logic_state.serial_ports:
self.main_app.wCombo_serial_port.addItem(serial_port)
if len(self.logic_state.serial_ports) > 0:
self.main_app.wCombo_serial_port.setCurrentIndex(0)
else:
self.logic_state.upload_port = None
self.main_app.wCombo_serial_port.setCurrentIndex(-1)

@Slot()
def serial_port_combo_box_changed(self, idx: int):
Expand Down

0 comments on commit c9762c1

Please sign in to comment.