diff options
author | Joshua Leung <aligorith@gmail.com> | 2015-12-11 07:27:32 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2015-12-11 07:27:32 +0300 |
commit | 9afd9dc78e06926206a9f451974e24c4d73e521e (patch) | |
tree | 55f17c5dcfac3fb23aa4b336f506a4b903a167ff | |
parent | ca8184c6cceb727f46e6175f4dc835c112b225c2 (diff) |
Fix: Save off GPencil eraser size earlier, to prevent it from being zeroed if something goes wrong (e.g. locked layers) in the meantime
-rw-r--r-- | source/blender/editors/gpencil/gpencil_paint.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c index 04e9a777a46..753aa3bdf85 100644 --- a/source/blender/editors/gpencil/gpencil_paint.c +++ b/source/blender/editors/gpencil/gpencil_paint.c @@ -1181,6 +1181,12 @@ static tGPsdata *gp_session_initpaint(bContext *C) gp_session_initdata(C, p); + /* radius for eraser circle is defined in userprefs now */ + /* NOTE: we do this here, so that if we exit immediately, + * erase size won't get lost + */ + p->radius = U.gp_eraser; + /* return context data for running paint operator */ return p; } @@ -1519,9 +1525,6 @@ static int gpencil_draw_init(bContext *C, wmOperator *op) return 0; } - /* radius for eraser circle is defined in userprefs now */ - p->radius = U.gp_eraser; - /* everything is now setup ok */ return 1; } |