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

Chris Lumens clumens at redhat.com
Mon Oct 15 20:32:33 UTC 2012


> 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):

Looks fine, provided there's no way to get to this point where itr is
None.

- Chris


More information about the anaconda-patches mailing list