Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2014-03-06 17:17:26 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2014-03-06 17:17:26 +0400
commitcfefc5d0d4e6e704333936a295d6ffa45122fb1b (patch)
tree77b75171f66eb32922fb97fbcb1b97a45da6841b /source/blender/editors/space_action
parent4ce7d5cb79e23c4b28b1f1afe11fa066f3a5ea9c (diff)
Fix T38987 Dope sheet is inoperable with "view slected" when nothing is selected.
Code was unconditionnaly setting view's xmin and xmax, even when it was aborting afterward.
Diffstat (limited to 'source/blender/editors/space_action')
-rw-r--r--source/blender/editors/space_action/action_edit.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/editors/space_action/action_edit.c b/source/blender/editors/space_action/action_edit.c
index e2ca45bbdc9..4c2cb16bdd1 100644
--- a/source/blender/editors/space_action/action_edit.c
+++ b/source/blender/editors/space_action/action_edit.c
@@ -368,7 +368,7 @@ static int actkeys_viewall(bContext *C, const bool only_sel, const bool only_xax
{
bAnimContext ac;
View2D *v2d;
- float extra;
+ float extra, min, max;
bool found;
/* get editor data */
@@ -377,11 +377,14 @@ static int actkeys_viewall(bContext *C, const bool only_sel, const bool only_xax
v2d = &ac.ar->v2d;
/* set the horizontal range, with an extra offset so that the extreme keys will be in view */
- found = get_keyframe_extents(&ac, &v2d->cur.xmin, &v2d->cur.xmax, only_sel);
+ found = get_keyframe_extents(&ac, &min, &max, only_sel);
if (only_sel && (found == false))
return OPERATOR_CANCELLED;
-
+
+ v2d->cur.xmin = min;
+ v2d->cur.xmax = max;
+
extra = 0.1f * BLI_rctf_size_x(&v2d->cur);
v2d->cur.xmin -= extra;
v2d->cur.xmax += extra;