From 1002128c7b30c61b0dee96ffcdec89464a7d5166 Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Sun, 26 Jan 2020 10:26:40 -0500 Subject: [PATCH] oslist: Only handle 'activate' if the oslist is visible Otherwise when we press enter for an already selected OS, it chooses the first alphabetic entry in the list, overwriting our selection Signed-off-by: Cole Robinson --- virtManager/oslist.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/virtManager/oslist.py b/virtManager/oslist.py index a83bc44fa..6031c4572 100644 --- a/virtManager/oslist.py +++ b/virtManager/oslist.py @@ -125,6 +125,9 @@ class vmmOSList(vmmGObjectUI): def _entry_activate_cb(self, src): os_list = self.widget("os-list") + if not os_list.is_visible(): + return + sel = os_list.get_selection() model, rows = sel.get_selected_rows() if rows: