From 5df03932a3046b23e26007f439222525fa221c3f Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Thu, 3 Dec 2020 14:18:46 +0200 Subject: startupscreen: correctly set usb mode Use the correct property to set initial usb mode value to the combobox. Change-Id: I395aa070bcb0c5f640bbecc5ab44550d41b50106 Reviewed-by: Rami Potinkara --- startupscreen/UsbModeDialog.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/startupscreen/UsbModeDialog.qml b/startupscreen/UsbModeDialog.qml index e923ac9..de4c2f6 100644 --- a/startupscreen/UsbModeDialog.qml +++ b/startupscreen/UsbModeDialog.qml @@ -75,7 +75,7 @@ Dialog { reboot.open() } onRejected: { - combobox.currentIndex = SettingsManager.mode === "cdcecm" ? 0 : 1 + combobox.currentIndex = combobox.indexOfValue(SettingsManager.usbMode) } ColumnLayout { @@ -91,7 +91,7 @@ Dialog { } ComboBox { id: combobox - currentIndex: SettingsManager.mode === "cdcecm" ? 0 : 1 + Component.onCompleted: currentIndex = indexOfValue(SettingsManager.usbMode) model: ["cdcecm", "rndis"] } } -- cgit v1.2.3