Revert "Fix changing virtual pixelsize having no affect if only main window is open"
authorCampbell Barton <ideasman42@gmail.com>
Fri, 4 Mar 2016 19:30:51 +0000 (06:30 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 4 Mar 2016 19:31:40 +0000 (06:31 +1100)
This reverts commit fe7bab13439fe6f0181f6661fbf7bb7ae18f5310.

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

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

index 657a8a3f51408537a5c57b103d36ea0e22e3600d..f4c6fdf42f5c5da470ecafee7451f872ebf594fb 100644 (file)
@@ -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 */
 }
index 572fbac080d98515a9f5bd65afec04eb76be64f1..688be21cdd09e1c5b67b5a30470674d9a79e3a95 100644 (file)
@@ -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 */