diff --git a/qubesmanager/settings.py b/qubesmanager/settings.py index 838fa3f..956b6b1 100755 --- a/qubesmanager/settings.py +++ b/qubesmanager/settings.py @@ -631,7 +631,7 @@ class VMSettingsWindow(ui_settingsdlg.Ui_SettingsDialog, QtGui.QDialog): try: if self.virt_mode.currentIndex() != self.virt_mode_idx: - self.vm.virt_mode = self.selected_virt_mode().lower() + self.vm.virt_mode = self.selected_virt_mode() except Exception as ex: # pylint: disable=broad-except msg.append(str(ex)) diff --git a/qubesmanager/utils.py b/qubesmanager/utils.py index 45de190..5b40f5f 100644 --- a/qubesmanager/utils.py +++ b/qubesmanager/utils.py @@ -60,6 +60,8 @@ def prepare_choice(widget, holder, propname, choice, default, oldvalue = qubesadmin.DEFAULT else: oldvalue = getattr(holder, propname) + if transform is not None and oldvalue is not None: + oldvalue = transform(oldvalue) else: oldvalue = object() # won't match for identity idx = 0