[Bf-blender-cvs] [5513762] master: Alternate fix for virtual-pixel update not working

Campbell Barton noreply at git.blender.org
Fri Mar 4 20:46:50 CET 2016


Commit: 55137629462d3ca2fb152b56cfe26507bdd2c352
Author: Campbell Barton
Date:   Sat Mar 5 06:37:56 2016 +1100
Branches: master
https://developer.blender.org/rB55137629462d3ca2fb152b56cfe26507bdd2c352

Alternate fix for virtual-pixel update not working

On changing, clear drawable window to force update.

===================================================================

M	source/blender/makesrna/intern/rna_userdef.c

===================================================================

diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index f4c6fdf..924bed3 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -144,12 +144,19 @@ static void rna_userdef_dpi_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Po
 	WM_main_add_notifier(NC_SCREEN | NA_EDITED, NULL);    /* refresh region sizes */
 }
 
-static void rna_userdef_virtual_pixel_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *UNUSED(ptr))
+static void rna_userdef_virtual_pixel_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *UNUSED(ptr))
 {
 	/* font's are stored at each DPI level, without this we can easy load 100's of fonts */
 	BLF_cache_clear();
 	
 	BKE_userdef_state();
+
+	/* force setting drawable again */
+	wmWindowManager *wm = bmain->wm.first;
+	if (wm) {
+		wm->windrawable = NULL;
+	}
+
 	WM_main_add_notifier(NC_WINDOW, NULL);      /* full redraw */
 	WM_main_add_notifier(NC_SCREEN | NA_EDITED, NULL);    /* refresh region sizes */
 }




More information about the Bf-blender-cvs mailing list