[Bf-blender-cvs] [1ec626f4bd0] master: Fix T85549: GPencil draw tool offset when UI scale is not 1

Antonio Vazquez noreply at git.blender.org
Mon Feb 22 17:18:46 CET 2021


Commit: 1ec626f4bd06e830edc13a8a6986eec2885499dd
Author: Antonio Vazquez
Date:   Mon Feb 22 17:18:26 2021 +0100
Branches: master
https://developer.blender.org/rB1ec626f4bd06e830edc13a8a6986eec2885499dd

Fix T85549: GPencil draw tool offset when UI scale is not 1

There was a mistake in the variables saved and when resolution of the UI was not 1.0, the viewport was offset.

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

M	source/blender/editors/gpencil/gpencil_fill.c

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

diff --git a/source/blender/editors/gpencil/gpencil_fill.c b/source/blender/editors/gpencil/gpencil_fill.c
index a81d319ab42..bf228af88a5 100644
--- a/source/blender/editors/gpencil/gpencil_fill.c
+++ b/source/blender/editors/gpencil/gpencil_fill.c
@@ -621,8 +621,8 @@ static bool gpencil_render_offscreen(tGPDfill *tgpf)
   }
 
   /* set temporary new size */
-  tgpf->bwinx = tgpf->region->sizex;
-  tgpf->bwiny = tgpf->region->sizey;
+  tgpf->bwinx = tgpf->region->winx;
+  tgpf->bwiny = tgpf->region->winy;
   tgpf->brect = tgpf->region->winrct;
 
   /* resize region */



More information about the Bf-blender-cvs mailing list