Fix coherence in network menu when adding/removing domains

This commit is contained in:
donoban 2021-02-09 21:11:35 +01:00
parent 4e6cf91f63
commit 8034060896
No known key found for this signature in database
GPG Key ID: 141310D8E3ED08A5

View File

@ -1033,6 +1033,7 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QMainWindow):
self.qubes_cache.remove_vm(name=kwargs['vm'])
self.proxy.invalidate()
self.init_template_menu()
self.init_network_menu()
def on_domain_status_changed(self, vm, event, **_kwargs):
try:
@ -1062,6 +1063,8 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QMainWindow):
return
try:
if event.endswith(':provides_network'):
self.init_network_menu()
self.qubes_cache.get_vm(qid=vm.qid).update(event=event)
self.proxy.invalidate()
except exc.QubesDaemonAccessError: