aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/action.h1
-rw-r--r--src/canvas.c4
2 files changed, 5 insertions, 0 deletions
diff --git a/src/action.h b/src/action.h
index 825057f..67f9077 100644
--- a/src/action.h
+++ b/src/action.h
@@ -12,6 +12,7 @@ struct action_pixcol {
struct ActionPixelsColors {
long int cnt;
+ unsigned lyr;
struct action_pixcol *pix;
};
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];