svn merge -r 15392:15551 https://svn.blender.org/svnroot/bf-blender/trunk/blender
[blender.git] / source / blender / src / editsima.c
index 18a9803dcae088762e8b33efc54b3d7f82d345bb..69070d61bf0e6abab0de8eaab33656fabc65f5b1 100644 (file)
@@ -694,7 +694,7 @@ void mouse_select_sima(void)
        EditFace *efa;
        MTFace *tf, *nearesttf;
        EditFace *nearestefa=NULL;
-       int a, selectsticky, edgeloop, actface, nearestuv, nearestedge, i, shift;
+       int a, selectsticky, edgeloop, actface, nearestuv, nearestedge, i, shift, island=0;
        char sticky= 0;
        int flush = 0; /* 0 == dont flush, 1 == sel, -1 == desel;  only use when selection sync is enabled */
        unsigned int hitv[4], nearestv;
@@ -706,7 +706,7 @@ void mouse_select_sima(void)
        
        edgeloop= G.qual & LR_ALTKEY;
        shift= G.qual & LR_SHIFTKEY;
-
+       
        if (G.sima->flag & SI_SYNC_UVSEL) {
                /* copy from mesh */
                if (G.scene->selectmode == SCE_SELECT_FACE) {
@@ -718,7 +718,8 @@ void mouse_select_sima(void)
                }
        } else {
                /* normal operation */
-               actface= G.sima->flag & SI_SELACTFACE;
+               actface= G.sima->selectmode == SI_SELECT_FACE;
+               island= G.sima->selectmode == SI_SELECT_ISLAND;
                
                switch(G.sima->sticky) {
                case SI_STICKY_LOC:
@@ -760,6 +761,9 @@ void mouse_select_sima(void)
                
                if (nearestefa->v4)     hitv[3]= nearestefa->v4->tmp.l;
                else                            hitv[3]= 0xFFFFFFFF;
+       }
+       else if (island) {
+
        }
        else {
                find_nearest_uv(&nearesttf, &nearestefa, &nearestv, &nearestuv);
@@ -774,7 +778,11 @@ void mouse_select_sima(void)
                }
        }
 
-       if(!edgeloop && shift) {
+       if (island) {
+               if(shift) select_linked_tface_uv(1);
+               else select_linked_tface_uv(0);
+       }
+       else if(!edgeloop && shift) {
                /* (de)select face */
                if(actface) {
                        if(simaFaceSel_Check(nearestefa, nearesttf)) {