virt-manager/532255b4-unselect_all-members-before-clear-model.patch
Charles Arnold 898a7107e7 - bnc#868676 - Error changing VM configuration: unsupported
configuration: unknown driver format value 'block' 
  virtinst-xen-drive-type.patch

- bnc#868200 - Unable to complete install: "NoneType' object has no
  attribute '__getitem__" 
  virtinst-detect-suse-distros.patch

- For Xen always have the arch expander expanded.
- For Xen and KVM default to Network install if host was installed
  from the network
- Default to a bridge with an actual inet address if available
  virtinst-modify-gui-defaults.patch
- We are not supporting PV ISO installs with virt-install.
  Drop the following patches
  virtinst-allow-pv-iso-install.patch
  virtman-allow-pv-iso-install.patc

- Upstream bug fixes
  5321d3cd-virtinst-drop-cpu_map-parsing-of-arch-features.patch
  5321d3d0-virtinst-drop-parsing-of-cpu-features.patch
  5321f256-virtinst-use-libvirt-getCPUModelNames.patch
  532255b4-unselect_all-members-before-clear-model.patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=152
2014-03-19 15:18:34 +00:00

64 lines
2.4 KiB
Diff

Subject: host: unselect_all members before clear model
From: Chen Hanxiao chenhanxiao@cn.fujitsu.com Fri Mar 14 09:04:34 2014 +0800
Date: Fri Mar 14 09:04:52 2014 +0800:
Git: 1d3980015a942e5aceee0233c9b90d2bbe32ffdd
Interface_selected is being triggered by model.clear() in
populate_interfaces. It usually calls interface_selected
on every interface after the current selected row.
So the gtk code is probably removing the first
row over and over, and when it removes the
current selection (the interface we are deleting),
it selects the next row in line.
It will raise a KeyError.
This patch will fix this issue.
Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
diff --git a/virtManager/host.py b/virtManager/host.py
index c8d7ee0..a1aa2fd 100644
--- a/virtManager/host.py
+++ b/virtManager/host.py
@@ -679,6 +679,7 @@ class vmmHost(vmmGObjectUI):
curnet = self.current_network()
net_list = self.widget("net-list")
+ net_list.get_selection().unselect_all()
model.clear()
for uuid in self.conn.list_net_uuids():
net = self.conn.get_net(uuid)
@@ -1220,6 +1221,7 @@ class vmmHost(vmmGObjectUI):
curiface = self.current_interface()
iface_list = self.widget("interface-list")
+ iface_list.get_selection().unselect_all()
model.clear()
for name in self.conn.list_interface_names():
iface = self.conn.get_interface(name)
@@ -1234,6 +1236,7 @@ class vmmHost(vmmGObjectUI):
interface = self.current_interface()
child_list = self.widget("interface-child-list")
model = child_list.get_model()
+ child_list.get_selection().unselect_all()
model.clear()
if not interface:
@@ -1278,6 +1281,7 @@ def populate_storage_pools(pool_list, conn, curpool):
model = pool_list.get_model()
# Prevent events while the model is modified
pool_list.set_model(None)
+ pool_list.get_selection().unselect_all()
model.clear()
for uuid in conn.list_pool_uuids():
per = get_pool_size_percent(conn, uuid)
@@ -1297,6 +1301,7 @@ def populate_storage_pools(pool_list, conn, curpool):
def populate_storage_volumes(list_widget, pool, sensitive_cb):
vols = pool and pool.get_volumes() or {}
model = list_widget.get_model()
+ list_widget.get_selection().unselect_all()
model.clear()
for key in vols.keys():