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 <crobinso@redhat.com>
This commit is contained in:
Cole Robinson 2020-01-26 10:26:40 -05:00
parent c6e85295e8
commit 1002128c7b
1 changed files with 3 additions and 0 deletions

View File

@ -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: