Not allowing to modify devices of a running VM (ticket #523)
This commit is contained in:
parent
f928dab468
commit
5b09bf0bb1
@ -463,6 +463,13 @@ class VMSettingsWindow(Ui_SettingsDialog, QDialog):
|
||||
self.dmm_warning_adv.hide()
|
||||
self.dmm_warning_dev.hide()
|
||||
|
||||
if self.vm.is_running():
|
||||
self.dev_list.setEnabled(False)
|
||||
self.turn_off_vm_to_modify_devs.setVisible(True)
|
||||
else:
|
||||
self.dev_list.setEnabled(True)
|
||||
self.turn_off_vm_to_modify_devs.setVisible(False)
|
||||
|
||||
|
||||
def __apply_devices_tab__(self):
|
||||
sth_changed = False
|
||||
|
@ -29,7 +29,7 @@
|
||||
<locale language="English" country="UnitedStates"/>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>4</number>
|
||||
<number>3</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="basic_tab">
|
||||
<property name="locale">
|
||||
@ -757,8 +757,8 @@
|
||||
<attribute name="title">
|
||||
<string>Devices</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout_6">
|
||||
<item row="0" column="0">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="devices_layout">
|
||||
<item>
|
||||
<widget class="QLabel" name="dmm_warning_dev">
|
||||
@ -777,6 +777,20 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="turn_off_vm_to_modify_devs">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<italic>true</italic>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>To modify PCI devices you have to turn off the VM.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
|
Loading…
Reference in New Issue
Block a user