diff options
Diffstat (limited to 'src/user.c')
-rw-r--r-- | src/user.c | 13 |
1 files changed, 4 insertions, 9 deletions
@@ -165,12 +165,11 @@ user_tool_change(const Arg *x) } void -user_testing_layer_add(const Arg *x) +user_layer_add(const Arg *x) { -/* TODO: temp function */ if (cur_canvas == NULL) return; - canvas_add_layer(cur_canvas, -1); - cur_canvas->cur_layer = cur_canvas->layer_arr_cnt-1; + canvas_add_layer(cur_canvas, cur_canvas->cur_layer+1); + cur_canvas->cur_layer++; ui_redraw_panel(UI_PANELTYPE_CANVAS); ui_redraw_panel(UI_PANELTYPE_TIMELINE); } @@ -179,11 +178,7 @@ void user_layer_chng(const Arg *x) { if (cur_canvas == NULL) return; - cur_canvas->cur_layer += (unsigned int)cur_canvas->layer_arr_cnt; - cur_canvas->cur_layer += (x->i % (int)cur_canvas->layer_arr_cnt); - cur_canvas->cur_layer %= cur_canvas->layer_arr_cnt; - - ui_redraw_panel(UI_PANELTYPE_CANVAS); + canvas_change_layer(cur_canvas, (cur_canvas->cur_layer + (unsigned int)cur_canvas->layer_arr_cnt + (x->i % (int)cur_canvas->layer_arr_cnt)) % cur_canvas->layer_arr_cnt); ui_redraw_panel(UI_PANELTYPE_TIMELINE); } |