Merge remote-tracking branch 'origin/pr/244'

Fixes QubesOS/qubes-issues#5902
* origin/pr/244:
  Don't reset template when changing type during qube creation
This commit is contained in:
Marek Marczykowski-Górecki 2020-06-24 15:38:48 +02:00
commit f74b078008
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -233,14 +233,16 @@ class NewVmDlg(QtWidgets.QDialog, Ui_NewVMDlg):
# AppVM
if self.vm_type.currentIndex() == 0:
self.template_vm.setEnabled(True)
self.template_vm.setCurrentIndex(0)
if self.template_vm.currentIndex() == -1:
self.template_vm.setCurrentIndex(0)
self.install_system.setEnabled(False)
self.install_system.setChecked(False)
# Standalone - based on a template
if self.vm_type.currentIndex() == 1:
self.template_vm.setEnabled(True)
self.template_vm.setCurrentIndex(0)
if self.template_vm.currentIndex() == -1:
self.template_vm.setCurrentIndex(0)
self.install_system.setEnabled(False)
self.install_system.setChecked(False)