[master] [PATCH] Do not remove the layout if it was added back (#865830)

Vratislav Podzimek vpodzime at redhat.com
Mon Oct 15 07:39:42 UTC 2012


When replacing the last layout in the list, user may mark the same
layout (among the others) for adding. In such cases we shouldn't
remove the layout from the list and just leave it where it was.

Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
---
 pyanaconda/ui/gui/spokes/keyboard.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/pyanaconda/ui/gui/spokes/keyboard.py b/pyanaconda/ui/gui/spokes/keyboard.py
index 3dce1d7..fd9e6ab 100644
--- a/pyanaconda/ui/gui/spokes/keyboard.py
+++ b/pyanaconda/ui/gui/spokes/keyboard.py
@@ -280,7 +280,8 @@ class KeyboardSpoke(NormalSpoke):
 
             if self._remove_last_attempt:
                 itr = self._store.get_iter_first()
-                self._removeLayout(self._store, itr)
+                if not self._store[itr][0] in dialog.chosen_layouts:
+                    self._removeLayout(self._store, itr)
                 self._remove_last_attempt = False
 
     def _run_add_from_removed(self, button):
-- 
1.7.11.4



More information about the anaconda-patches mailing list