transform manipulator didnt follow the active face in some cases, also rotate about...
[blender.git] / source / blender / src / transform_generics.c
index a0dde01ba8e551bf58165723b1b5478e8b137dd9..8154929eb172c05898401a086aa7df2fe8ca7c79 100644 (file)
@@ -972,11 +972,12 @@ void calculateCenter(TransInfo *t)
                calculateCenterMedian(t);
                break;
        case V3D_ACTIVE:
+               {
                /* set median, and if if if... do object center */
-               
+               EditSelection ese;
                /* EDIT MODE ACTIVE EDITMODE ELEMENT */
-               if (G.obedit && G.obedit->type == OB_MESH && G.editMesh->selected.last) {
-                       EM_editselection_center(t->center, G.editMesh->selected.last);
+               if (G.obedit && G.obedit->type == OB_MESH && EM_get_actSelection(&ese)) {
+                       EM_editselection_center(t->center, &ese);
                        calculateCenter2D(t);
                        break;
                } /* END EDIT MODE ACTIVE ELEMENT */
@@ -989,6 +990,8 @@ void calculateCenter(TransInfo *t)
                                projectIntView(t, t->center, t->center2d);
                        }
                }
+               
+               }
        }
 
        /* setting constraint center */