Bugfix [#32331] Graph editor zoom to selected includes coordinate origin if more
authorJoshua Leung <aligorith@gmail.com>
Sat, 18 Aug 2012 04:39:15 +0000 (04:39 +0000)
committerJoshua Leung <aligorith@gmail.com>
Sat, 18 Aug 2012 04:39:15 +0000 (04:39 +0000)
commit654f6c4c4f7f59cb7fcc2d3bd78ea09a86fff644
tree7c3c4e9d1955ff0d1200cb84150d972cd6c83c66
parent8995554105e05caf42b29922fba41e7be67003f3
Bugfix [#32331] Graph editor zoom to selected includes coordinate origin if more
than one curve is displayed

The range calculation used to use a fixed 0-1 range whenever it couldn't find
any values for a particular F-Curve. However, this was then taken by the
aggregation calculation to be used as just another value, leading to problems if
only vertices of a very high-value curve are selected to be included.

Modified the range calculation to ensure that suitable vertices were found
before trying to take the range values returned.
source/blender/blenkernel/BKE_fcurve.h
source/blender/blenkernel/intern/fcurve.c
source/blender/editors/space_graph/graph_edit.c