Duplicate items when pasting

This allows pasting items more than once.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
This commit is contained in:
Lukas Fleischer 2012-07-04 09:34:48 +02:00
parent 3b259b5620
commit 352887887f

View File

@ -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) void interact_day_item_paste(unsigned *nb_events, unsigned *nb_apoints)
{ {
int item_type; int item_type;
struct day_item day;
if (!day_cut.type) if (!day_cut.type)
return; return;
item_type = day_paste_item(&day_cut, calendar_get_slctd_day_sec()); day_item_fork(&day_cut, &day);
day_cut.type = 0; item_type = day_paste_item(&day, calendar_get_slctd_day_sec());
calendar_monthly_view_cache_set_invalid(); calendar_monthly_view_cache_set_invalid();