Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2021-06-09 18:55:44 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-06-09 19:22:45 +0300
commitbda8887e0cdfd2fc035b6f1d97f16120f719c6a3 (patch)
tree270c3995d9b2d80492355ff8f9d07e26dc019d5e
parent5575aba0256b584d66d2492345cea5ad6cee0eb5 (diff)
Cleanup: simplify grease pencil preset set logic
-rw-r--r--source/blender/blenkernel/intern/brush.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c
index 20c5af0efb6..fdf9cf21b85 100644
--- a/source/blender/blenkernel/intern/brush.c
+++ b/source/blender/blenkernel/intern/brush.c
@@ -1400,13 +1400,11 @@ void BKE_brush_gpencil_paint_presets(Main *bmain, ToolSettings *ts, const bool r
}
/* Set default Draw brush. */
- if (reset || brush_prev == NULL) {
- BKE_paint_brush_set(paint, deft_draw);
+ if ((reset == false) && (brush_prev != NULL)) {
+ BKE_paint_brush_set(paint, brush_prev);
}
else {
- if (brush_prev != NULL) {
- BKE_paint_brush_set(paint, brush_prev);
- }
+ BKE_paint_brush_set(paint, deft_draw);
}
}