From af99beb6a27a31034160686eabab17e282f6ab52 Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Thu, 15 Oct 2020 17:45:08 +0200 Subject: [PATCH] Allow simple copying from start time to end time --- src/frontend/linear.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/frontend/linear.c b/src/frontend/linear.c index 98c44385f..c0c8ce2f3 100644 --- a/src/frontend/linear.c +++ b/src/frontend/linear.c @@ -178,9 +178,6 @@ com_cutout(wordlist* wl) istart = 0; } sto = vec_fromplot("cut-tstop", plot_cur); - /* return if neither start nor stop are given */ - if (!sta && !sto) - return; if (sto) { tstop = sto->v_realdata[0]; for (istop = 0; istop < length - 1; istop++) { @@ -206,7 +203,10 @@ com_cutout(wordlist* wl) old = plot_cur; oldtime = old->pl_scale; new = plot_alloc("transient"); - new->pl_name = tprintf("%s (cut out)", old->pl_name); + if (!sta && !sto) + new->pl_name = tprintf("%s (copy)", old->pl_name); + else + new->pl_name = tprintf("%s (cut out)", old->pl_name); new->pl_title = copy(old->pl_title); new->pl_date = copy(old->pl_date); new->pl_next = plot_list;