diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-10-12 01:54:26 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-10-12 01:54:26 +0300 |
commit | 6f6d76554f4eb5335a42874da65d2fca7bbb2cb0 (patch) | |
tree | f8112969e8e760e9cf00c58f4a0b83fad9832336 /source/blender/editors/gpencil/gpencil_data.c | |
parent | 45881003f0efc14e50a055c7b5c3feec1f2b890c (diff) |
UI: move layer up/down reverse into the operator
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_data.c')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_data.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/gpencil/gpencil_data.c b/source/blender/editors/gpencil/gpencil_data.c index bfaf0ee2659..64cb91c3e14 100644 --- a/source/blender/editors/gpencil/gpencil_data.c +++ b/source/blender/editors/gpencil/gpencil_data.c @@ -338,7 +338,8 @@ static int gp_layer_move_exec(bContext *C, wmOperator *op) bGPdata *gpd = ED_gpencil_data_get_active(C); bGPDlayer *gpl = BKE_gpencil_layer_getactive(gpd); - int direction = RNA_enum_get(op->ptr, "type"); + const bool reverse = (bool)(U.gp_settings & GP_PAINT_REVERSE_LAYERS); + const int direction = RNA_enum_get(op->ptr, "type") * (reverse ? -1 : 1); /* sanity checks */ if (ELEM(NULL, gpd, gpl)) |