[Bf-committers] User Preferences Option for Multitouch Gestures

patrick boelens p_boelens at msn.com
Sun Apr 1 01:12:05 CEST 2012


Actually the other cases do call it, though I did have it in there twice (once in the else, once outside); sorry about that!
I kept the final one and also put the trackpad specific code within the if-block.
I also moved the update_tablet_data() there, as a call to that for a wheelEvent just seemed overkill and that one does get called from other ifs as well.
I did keep the if-else block just for consistency's sake, but good to know I can use them.

Also, my apologies for the many questions, big and small, just trying to find my way into the code and best practices for it. Thanks for all your help so far! =)

-Patrick

> Date: Sat, 31 Mar 2012 18:51:31 -0400
> From: significant.bit at gmail.com
> To: bf-committers at blender.org
> Subject: Re: [Bf-committers] User Preferences Option for Multitouch Gestures
> 
> On Sat, Mar 31, 2012 at 6:16 PM, patrick boelens <p_boelens at msn.com> wrote:
> > Sounds good to me! On the other hand it also does feel like a bit of code duplication.
> > Should the behaviour for a GHOST_kEventTrackpad ever change, the GHOST_kEventTrackpad must also be modified.
> 
> Eh, we usually have bigger things to worry about. Like whether or not
> wm_event_add belongs in there. I noticed that the other cases don't
> call this, which suggests that wm_event_add is called once at the end
> for all cases. Don't have the code handy on this machine, so can't
> verify.
> 
> > ... personally I'd use a ternary operator here. Are there any guidelines on whether or not, or when to use these?
> > I couldn't find anything on this in the CodeStyle doc.
> 
> Thanks for reading that! I usually just submit what I think looks good
> and wait for someone to yell at me. For something simple like this,
> use whatever is ? more : clear.
> 
> Mike Erwin
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers
 		 	   		  


More information about the Bf-committers mailing list