details: allow to remove video device if it's not the last one

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1659354

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
Pavel Hrdina 2019-01-28 17:52:38 +01:00
parent 9b2e6886d0
commit 943b2a400e
1 changed files with 4 additions and 2 deletions

View File

@ -2975,9 +2975,11 @@ class vmmDetails(vmmGObjectUI):
else:
self.widget("video-3d").set_active(vid.accel3d)
if self.vm.xmlobj.devices.graphics:
if (self.vm.xmlobj.devices.graphics and
len(self.vm.xmlobj.devices.video) <= 1):
self._disable_device_remove(
_("Cannot remove device while Graphics/Display is attached."))
_("Cannot remove last video device while "
"Graphics/Display is attached."))
def refresh_watchdog_page(self, watch):
model = watch.model