transform manipulator didnt follow the active face in some cases, also rotate about...
[blender.git] / source / blender / src / transform_orientations.c
index 5c35a80c43f94c50ef2f6745b65fe3b6b09f02e1..301ac8aa24835a48fc584a60c565ca80bd724593 100644 (file)
@@ -379,16 +379,16 @@ int getTransformOrientation(float normal[3], float plane[3], int activeOnly)
                {
                        EditMesh *em = G.editMesh;
                        EditVert *eve;
+                       EditSelection ese;
                        float vec[3]= {0,0,0};
                        
                        /* USE LAST SELECTED WITH ACTIVE */
-                       if (activeOnly && em->selected.last)
+                       if (activeOnly && EM_get_actSelection(&ese))
                        {
-                               EditSelection *ese = em->selected.last;
-                               EM_editselection_normal(normal, ese);
-                               EM_editselection_plane(plane, ese);
+                               EM_editselection_normal(normal, &ese);
+                               EM_editselection_plane(plane, &ese);
                                
-                               switch (ese->type)
+                               switch (ese.type)
                                {
                                        case EDITVERT:
                                                result = ORIENTATION_VERT;