diff --git a/src/virtManager/details.py b/src/virtManager/details.py index 3ee53fd6..e56b6b59 100644 --- a/src/virtManager/details.py +++ b/src/virtManager/details.py @@ -1227,6 +1227,9 @@ class vmmDetails(vmmGObjectUI): if self.ignorePause: return + # Let state handler listener change things if necc. + self.set_pause_state(not src.get_active()) + if not self.vm.is_paused(): self.emit("action-suspend-domain", self.vm.get_connection().get_uri(), @@ -1236,8 +1239,6 @@ class vmmDetails(vmmGObjectUI): self.vm.get_connection().get_uri(), self.vm.get_uuid()) - # Let state handler listener change things if necc. - self.set_pause_state(not src.get_active()) def control_vm_run(self, src_ignore): self.emit("action-run-domain", diff --git a/src/virtManager/manager.py b/src/virtManager/manager.py index f69040ec..7d902520 100644 --- a/src/virtManager/manager.py +++ b/src/virtManager/manager.py @@ -637,15 +637,15 @@ class vmmManager(vmmGObjectUI): do_pause = src.get_active() + # Set button state back to original value: just let the status + # update function fix things for us + self.set_pause_state(not do_pause) + if do_pause: self.pause_vm(None) else: self.resume_vm(None) - # Set button state back to original value: just let the status - # update function fix things for us - self.set_pause_state(not do_pause) - def start_vm(self, ignore): vm = self.current_vm() if vm is not None: