Merge remote-tracking branch 'origin/pr/233'
* origin/pr/233: Template should not be enabled for running VMs in VM Settings Show correct template for DispVMs VM Settings
This commit is contained in:
commit
f1ad829d71
@ -389,10 +389,20 @@ class VMSettingsWindow(ui_settingsdlg.Ui_SettingsDialog, QtWidgets.QDialog):
|
||||
self.vm.app.default_template,
|
||||
(lambda vm: vm.klass == 'TemplateVM'),
|
||||
allow_default=False, allow_none=False)
|
||||
elif self.vm.klass == 'DispVM':
|
||||
self.template_list, self.template_idx = utils.prepare_vm_choice(
|
||||
self.template_name,
|
||||
self.vm, 'template',
|
||||
self.vm.app.default_dispvm,
|
||||
(lambda vm: getattr(vm, 'template_for_dispvms', False)),
|
||||
allow_default=False, allow_none=False)
|
||||
else:
|
||||
self.template_name.setEnabled(False)
|
||||
self.template_idx = -1
|
||||
|
||||
if self.vm.is_running():
|
||||
self.template_name.setEnabled(False)
|
||||
|
||||
self.netvm_list, self.netvm_idx = utils.prepare_vm_choice(
|
||||
self.netVM,
|
||||
self.vm, 'netvm',
|
||||
|
Loading…
Reference in New Issue
Block a user