From 114f158eeb6518d9bdf5b6dda26dcdc209c658bb Mon Sep 17 00:00:00 2001 From: Vratislav Podzimek Date: Fri, 12 Oct 2012 17:00:26 +0200 Subject: Do not remove the layout if it was added back (#865830) 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. --- 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 3dce1d7b7..fd9e6abea 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): -- cgit