[Bf-blender-cvs] [f33e441] master: Revert "Fix changing virtual pixelsize having no affect if only main window is open"

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


Commit: f33e44151ebc454fef0338b76120dac67a106722
Author: Campbell Barton
Date:   Sat Mar 5 06:30:51 2016 +1100
Branches: master
https://developer.blender.org/rBf33e44151ebc454fef0338b76120dac67a106722

Revert "Fix changing virtual pixelsize having no affect if only main window is open"

This reverts commit fe7bab13439fe6f0181f6661fbf7bb7ae18f5310.

Setting correct context is important,
but this is setting DPI and widget unit on *every* mouse move.

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

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

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

diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index 657a8a3..f4c6fdf 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -148,7 +148,8 @@ static void rna_userdef_virtual_pixel_update(Main *UNUSED(bmain), Scene *UNUSED(
 {
 	/* font's are stored at each DPI level, without this we can easy load 100's of fonts */
 	BLF_cache_clear();
-
+	
+	BKE_userdef_state();
 	WM_main_add_notifier(NC_WINDOW, NULL);      /* full redraw */
 	WM_main_add_notifier(NC_SCREEN | NA_EDITED, NULL);    /* refresh region sizes */
 }
diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c
index 572fbac..688be21 100644
--- a/source/blender/windowmanager/intern/wm_window.c
+++ b/source/blender/windowmanager/intern/wm_window.c
@@ -831,11 +831,11 @@ void wm_window_make_drawable(wmWindowManager *wm, wmWindow *win)
 			printf("%s: set drawable %d\n", __func__, win->winid);
 		}
 		GHOST_ActivateWindowDrawingContext(win->ghostwin);
+		
+		/* this can change per window */
+		U.pixelsize = wm_window_pixelsize(win);
+		BKE_userdef_state();
 	}
-
-	/* this can change per window */
-	U.pixelsize = wm_window_pixelsize(win);
-	BKE_userdef_state();
 }
 
 /* called by ghost, here we handle events for windows themselves or send to event system */




More information about the Bf-blender-cvs mailing list