mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-01-11 05:17:59 +03:00
details: fix --show-domain-performance
the introspection page could be missing, in this case the tabs values are shifted by one. The new code looks for the correct row number before selecting it. Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1167600 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
parent
9d633879b1
commit
ad1f0fa081
@ -1361,7 +1361,13 @@ class vmmDetails(vmmGObjectUI):
|
||||
|
||||
def activate_performance_page(self):
|
||||
self.widget("details-pages").set_current_page(DETAILS_PAGE_DETAILS)
|
||||
self.set_hw_selection(HW_LIST_TYPE_STATS)
|
||||
index = 0
|
||||
model = self.widget("hw-list").get_model()
|
||||
for i in range(len(model)):
|
||||
if model[i][HW_LIST_COL_TYPE] == HW_LIST_TYPE_STATS:
|
||||
index = i
|
||||
break
|
||||
self.set_hw_selection(index)
|
||||
|
||||
def activate_config_page(self):
|
||||
self.widget("details-pages").set_current_page(DETAILS_PAGE_DETAILS)
|
||||
|
Loading…
Reference in New Issue
Block a user