diff options
Diffstat (limited to 'src/canvas.c')
-rw-r--r-- | src/canvas.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/canvas.c b/src/canvas.c index cfee1a3..927bde1 100644 --- a/src/canvas.c +++ b/src/canvas.c @@ -4,6 +4,7 @@ #include <SDL2/SDL_image.h> #include "types.h" +#include "ui.h" /* TODO: remove ui.h from canvas */ #include "action.h" #include "canvas.h" #include "cdraw.h" @@ -606,6 +607,7 @@ action_do(Canvas *c) action_remove(&c->history[c->hist_i]); c->history[c->hist_i].type = ACT_PIXELSCOLORS; c->history[c->hist_i].act.px.cnt = c->temp_cnt; + c->history[c->hist_i].act.px.lyr = c->cur_layer; c->history[c->hist_i].act.px.pix = malloc(c->temp_cnt * sizeof(struct action_pixcol)); memcpy(c->history[c->hist_i].act.px.pix, c->temp_pix, c->temp_cnt * sizeof(struct action_pixcol)); if (c->hist_i == c->hist_e) @@ -668,6 +670,8 @@ action_pixcols_redo(Canvas *c, Action *a) { struct action_pixcol *pnt, *end; unsigned int col; + canvas_change_layer(c, a->act.px.lyr); + ui_redraw_panel(UI_PANELTYPE_TIMELINE); pnt = a->act.px.pix; end = &pnt[a->act.px.cnt]; |