feat(gui): trained_xxxx.index hint (fix #1070)

This commit is contained in:
源文雨
2024-01-25 21:53:29 +09:00
parent 918ab7b62f
commit 3b2a1d081c
2 changed files with 12 additions and 10 deletions

View File

@@ -530,7 +530,7 @@ if __name__ == "__main__":
self.gui_config.sg_hostapi = self.hostapis[0]
self.window["sg_hostapi"].Update(values=self.hostapis)
self.window["sg_hostapi"].Update(value=self.gui_config.sg_hostapi)
if self.gui_config.sg_input_device not in self.input_devices:
if self.gui_config.sg_input_device not in self.input_devices and len(self.input_devices) > 0:
self.gui_config.sg_input_device = self.input_devices[0]
self.window["sg_input_device"].Update(values=self.input_devices)
self.window["sg_input_device"].Update(