[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [14431] trunk/blender/source/blender/src/ editipo.c: lock view area wasnt working when all bones were de-selected
Campbell Barton
ideasman42 at gmail.com
Tue Apr 15 17:30:41 CEST 2008
Revision: 14431
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=14431
Author: campbellbarton
Date: 2008-04-15 17:29:32 +0200 (Tue, 15 Apr 2008)
Log Message:
-----------
lock view area wasnt working when all bones were de-selected
Modified Paths:
--------------
trunk/blender/source/blender/src/editipo.c
Modified: trunk/blender/source/blender/src/editipo.c
===================================================================
--- trunk/blender/source/blender/src/editipo.c 2008-04-15 14:34:57 UTC (rev 14430)
+++ trunk/blender/source/blender/src/editipo.c 2008-04-15 15:29:32 UTC (rev 14431)
@@ -982,20 +982,24 @@
/* 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);
+
+ 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);
+ }
}
- else {
- ipo_default_v2d_cur(G.sipo->blocktype, &G.v2d->cur);
- }
-
view2d_do_locks(curarea, V2D_LOCK_COPY);
}
More information about the Bf-blender-cvs
mailing list