fix for fix r33330, bug [#23118].
authorCampbell Barton <ideasman42@gmail.com>
Sat, 27 Nov 2010 00:23:06 +0000 (00:23 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 27 Nov 2010 00:23:06 +0000 (00:23 +0000)
combing hair the view matrix wasn't updated so depth comparison was incorrect.

source/blender/editors/physics/particle_edit.c

index 37a75d51bf0f1b8a0dc77936ff3ea181648a8ee8..1fd9e91095f805c9868bbf553bfbe24b97b125a7 100644 (file)
@@ -372,8 +372,10 @@ static void PE_set_view3d_data(bContext *C, PEData *data)
 
        if((data->vc.v3d->drawtype>OB_WIRE) && (data->vc.v3d->flag & V3D_ZBUF_SELECT)) {
                if(data->vc.v3d->flag & V3D_INVALID_BACKBUF) {
-                       view3d_validate_backbuf(&data->vc);
+                       /* needed or else the draw matrix can be incorrect */
+                       view3d_operator_needs_opengl(C);
 
+                       view3d_validate_backbuf(&data->vc);
                        /* we may need to force an update here by setting the rv3d as dirty
                         * for now it seems ok, but take care!:
                         * rv3d->depths->dirty = 1; */
@@ -1485,8 +1487,6 @@ static int select_linked_exec(bContext *C, wmOperator *op)
        mval[0]= location[0];
        mval[1]= location[1];
 
-       view3d_operator_needs_opengl(C);
-
        PE_set_view3d_data(C, &data);
        data.mval= mval;
        data.rad=75.0f;