From 352887887fb187a6f4d644070f45a62d03e2fdf4 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Wed, 4 Jul 2012 09:34:48 +0200 Subject: Duplicate items when pasting This allows pasting items more than once. Signed-off-by: Lukas Fleischer --- src/interaction.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/interaction.c b/src/interaction.c index feff4d8..d3f2cef 100644 --- a/src/interaction.c +++ b/src/interaction.c @@ -930,12 +930,13 @@ void interact_day_item_cut(unsigned *nb_events, unsigned *nb_apoints) void interact_day_item_paste(unsigned *nb_events, unsigned *nb_apoints) { int item_type; + struct day_item day; if (!day_cut.type) return; - item_type = day_paste_item(&day_cut, calendar_get_slctd_day_sec()); - day_cut.type = 0; + day_item_fork(&day_cut, &day); + item_type = day_paste_item(&day, calendar_get_slctd_day_sec()); calendar_monthly_view_cache_set_invalid(); -- cgit v1.2.3