Skip to content

Commit 06d30e5

Browse files
authored
Merge pull request #62 from rzglitch/patch
Fix machine and cpu combobox value correctly
2 parents 350398f + ff92553 commit 06d30e5

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

dialogExecution/editVMNew.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -339,28 +339,28 @@ def machineCpuAarch64(self, machine, cpu):
339339

340340
i = 0
341341

342-
while i < self.comboBox_17.count():
343-
if letQemuDecideContent.__contains__(self.comboBox_17.itemText(i)):
342+
while i < self.comboBox_18.count():
343+
if letQemuDecideContent.__contains__(self.comboBox_18.itemText(i)):
344344
if machine == "Let QEMU decide":
345-
self.comboBox_17.setCurrentIndex(i)
345+
self.comboBox_18.setCurrentIndex(i)
346346
break
347347

348-
elif self.comboBox_17.itemText(i) == machine:
349-
self.comboBox_17.setCurrentIndex(i)
348+
elif self.comboBox_18.itemText(i) == machine:
349+
self.comboBox_18.setCurrentIndex(i)
350350
break
351351

352352
i += 1
353353

354354
i = 0
355355

356-
while i < self.comboBox_18.count():
357-
if letQemuDecideContent.__contains__(self.comboBox_18.itemText(i)):
356+
while i < self.comboBox_17.count():
357+
if letQemuDecideContent.__contains__(self.comboBox_17.itemText(i)):
358358
if cpu == "Let QEMU decide":
359-
self.comboBox_18.setCurrentIndex(i)
359+
self.comboBox_17.setCurrentIndex(i)
360360
break
361361

362-
elif self.comboBox_18.itemText(i) == cpu:
363-
self.comboBox_18.setCurrentIndex(i)
362+
elif self.comboBox_17.itemText(i) == cpu:
363+
self.comboBox_17.setCurrentIndex(i)
364364
break
365365

366366
i += 1
@@ -890,4 +890,4 @@ def finishCreation(self):
890890
except sqlite3.Error as e:
891891
print(f"The SQLite module encountered an error: {e}.")
892892

893-
self.close()
893+
self.close()

0 commit comments

Comments
 (0)