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:
authorCampbell Barton <ideasman42@gmail.com>2008-04-15 19:29:32 +0400
committerCampbell Barton <ideasman42@gmail.com>2008-04-15 19:29:32 +0400
commite971f84927be514df6346118ac92cb854f70b3fe (patch)
treed99b202b5c020698b625fc1bbcdc6786ee10113d /source/blender/src/editipo.c
parent0346ed80bd510c34f40bd0e2d36a5cd5a350a51a (diff)
lock view area wasnt working when all bones were de-selected
Diffstat (limited to 'source/blender/src/editipo.c')
-rw-r--r--source/blender/src/editipo.c30
1 files changed, 17 insertions, 13 deletions
diff --git a/source/blender/src/editipo.c b/source/blender/src/editipo.c
index 143d003b986..a6fe0676fd8 100644
--- a/source/blender/src/editipo.c
+++ b/source/blender/src/editipo.c
@@ -982,20 +982,24 @@ static void make_editipo(void)
/* sets globals, bad stuff but we need these variables in other parts of code */
get_status_editipo();
- if(G.sipo->ipo) {
-
- if (G.sipo->flag & SIPO_LOCK_VIEW || G.sipo->pin)
- rf= &(G.sipo->v2d.cur);
- else
- rf= &(G.sipo->ipo->cur);
-
- if(rf->xmin<rf->xmax && rf->ymin<rf->ymax) G.v2d->cur= *rf;
- else ipo_default_v2d_cur(G.sipo->blocktype, &G.v2d->cur);
- }
- else {
- ipo_default_v2d_cur(G.sipo->blocktype, &G.v2d->cur);
- }
+ if (G.sipo->flag & SIPO_LOCK_VIEW) {
+ rf= &(G.v2d->cur); /* view is locked, dont move it, just to sanity check */
+ if(rf->xmin>=rf->xmax || rf->ymin>=rf->ymax) ipo_default_v2d_cur(G.sipo->blocktype, &G.v2d->cur);
+ } else {
+ if(G.sipo->ipo) {
+ if (G.sipo->pin)
+ rf= &(G.sipo->v2d.cur);
+ else
+ rf= &(G.sipo->ipo->cur);
+
+ if(rf->xmin<rf->xmax && rf->ymin<rf->ymax) G.v2d->cur= *rf;
+ else ipo_default_v2d_cur(G.sipo->blocktype, &G.v2d->cur);
+ }
+ else {
+ ipo_default_v2d_cur(G.sipo->blocktype, &G.v2d->cur);
+ }
+ }
view2d_do_locks(curarea, V2D_LOCK_COPY);
}