From 97bfe88ffa16a9836629a85a0d84154ba3660ab8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 5 Aug 2020 21:02:29 -0400 Subject: [PATCH] Ignore classic history when modern session starts (#3851) (#3852) See troubles found in #3844. Co-authored-by: Paul Wessel --- src/gmt_init.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gmt_init.c b/src/gmt_init.c index 4f5f4070a05..453cbe936db 100644 --- a/src/gmt_init.c +++ b/src/gmt_init.c @@ -17516,7 +17516,9 @@ int gmt_manage_workflow (struct GMTAPI_CTRL *API, unsigned int mode, char *text) } } } - if (error) return (error); /* Bail at this point */ + if (error) return (error); /* Bail at this point */ + gmt_reset_history (API->GMT); /* No old classic history shall affect a new modern mode session */ + gmt_conf (API->GMT); /* Get the original system defaults */ if (!clean_start) gmt_getdefaults (API->GMT, NULL); /* Overload user defaults */ snprintf (dir, PATH_MAX, "%s/%s", API->gwf_dir, GMT_SETTINGS_FILE); /* Reuse dir string for saving gmt.conf to this dir */