svn merge -r 16866:17042 https://svn.blender.org/svnroot/bf-blender/trunk/blender
[blender-staging.git] / source / blender / src / buttons_shading.c
index 6ec8ce78e73118668afee848ae5120596a26a787..7be862b0f15b28fb99ee125fa813d8e87ebe0aa8 100644 (file)
@@ -963,7 +963,9 @@ static void image_unlink_cb(void *ima_pp_v, void *unused)
        
        if(ima_pp && *ima_pp) {
                Image *ima= *ima_pp;
-               ima->id.us--;
+               /* (for time being, texturefaces are no users, conflict in design...) */
+               if(ima->id.us>1)
+                       ima->id.us--;
                *ima_pp= NULL;
        }
 }
@@ -2529,6 +2531,7 @@ void do_lampbuts(unsigned short event)
        case B_SHADBUF:
                la= G.buts->lockpoin; 
                la->mode &= ~LA_SHAD_RAY;
+               BIF_preview_changed(ID_LA);
                allqueue(REDRAWBUTSSHADING, 0); 
                allqueue(REDRAWVIEW3D, 0);              
                break;
@@ -2538,6 +2541,7 @@ void do_lampbuts(unsigned short event)
                /* yafray: 'softlight' uses it's own shadbuf. flag.
                   Must be cleared here too when switching from ray shadow */
                la->mode &= ~LA_YF_SOFT;
+               BIF_preview_changed(ID_LA);
                allqueue(REDRAWBUTSSHADING, 0);
                allqueue(REDRAWVIEW3D, 0);      
                break;