[anaconda:rhel7/master] Convert iter from filter model iter to backing store iter (#1074188)

mulhern amulhern at redhat.com
Mon Mar 17 14:27:54 UTC 2014


Resolves: rhbz#1074188

Previously the backing store was being indexed by means of an iter that
was a correct index into the filter model. It was not a correct index
into the backing store, so the set of disks checked by the user
was not the same as the set of disks actually selected.

Now the index is converted, so the set of checked disks and the set of
selected disks should be the same.

Signed-off-by: mulhern <amulhern at redhat.com>
---
 pyanaconda/ui/gui/spokes/filter.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/pyanaconda/ui/gui/spokes/filter.py b/pyanaconda/ui/gui/spokes/filter.py
index 4bc1a50..22e2ee5 100644
--- a/pyanaconda/ui/gui/spokes/filter.py
+++ b/pyanaconda/ui/gui/spokes/filter.py
@@ -611,7 +611,10 @@ class FilterSpoke(NormalSpoke):
         if not path:
             return
 
-        itr = self._store.get_iter(path)
+        page_index = self._notebook.get_current_page()
+        filter_model = self.pages[page_index].model
+        model_itr = filter_model.get_iter(path)
+        itr = filter_model.convert_iter_to_child_iter(model_itr)
         self._store[itr][1] = not self._store[itr][1]
 
         if self._store[itr][1] and self._store[itr][3] not in self.selected_disks:
-- 
1.8.3.1



More information about the anaconda-patches mailing list