[master/rhel7-branch][PATCH] Do nothing if previously selected selector gets focus again (#1029798)

Vratislav Podzimek vpodzime at redhat.com
Fri Mar 7 08:59:49 UTC 2014


On Thu, 2014-03-06 at 11:06 -0500, Anne Mulhern wrote:
> 
> 
> 
> ----- Original Message -----
> > From: "Vratislav Podzimek" <vpodzime at redhat.com>
> > To: anaconda-patches at lists.fedorahosted.org
> > Sent: Thursday, March 6, 2014 9:55:20 AM
> > Subject: [master/rhel7-branch][PATCH] Do nothing if previously selected	selector gets focus again (#1029798)
> > 
> > If the previously selected selector gets focus again, we don't have to
> > refresh
> > the right side of the custom spoke and potentially ruin a lot of things.
> > 
> > Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
> > ---
> >  pyanaconda/ui/gui/spokes/custom.py | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/pyanaconda/ui/gui/spokes/custom.py
> > b/pyanaconda/ui/gui/spokes/custom.py
> > index 40301b4..19b0627 100644
> > --- a/pyanaconda/ui/gui/spokes/custom.py
> > +++ b/pyanaconda/ui/gui/spokes/custom.py
> > @@ -2554,7 +2554,7 @@ class CustomPartitioningSpoke(NormalSpoke,
> > StorageChecker):
> >          self._clear_current_selector()
> >  
> >      def on_selector_clicked(self, selector):
> > -        if not self._initialized:
> > +        if not self._initialized or (self._current_selector is selector):
> >              return
> >  
> >          # Take care of the previously chosen selector.
> > --
> > 1.8.5.3
> > 
> > _______________________________________________
> > anaconda-patches mailing list
> > anaconda-patches at lists.fedorahosted.org
> > https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
> > 
> 
> Looks good to me, but if you do not return that means that
> self._initialized is True and that self.current_selector is not selector for the rest of the function.
> 
> So, you can change:
> 
>         if self._current_selector and self._initialized and \
>            self._current_selector != selector:
> 
> to
>         if self._current_selector:
> 
> just below, I should think.
Very nice catch! Fixed locally, thanks!

-- 
Vratislav Podzimek

Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic



More information about the anaconda-patches mailing list