Index: parse_l.c =================================================================== --- parse_l.c (revision 38648) +++ parse_l.c (revision 38649) @@ -2769,6 +2769,13 @@ io_pcb_preproc_board(PCB); + if (settings_dest != RND_CFR_invalid) { + /* Parse() will set items in settings_dest, reset before that so + values from the previous design won't leak in */ + rnd_conf_reset(settings_dest, ""); + rnd_conf_main_root_replace_cnt[settings_dest]++; + } + pcb_data_clip_inhibit_inc(PCB->Data); fcmd = conf_core.rc.file_command; retval = Parse(NULL, fcmd, conf_core.rc.file_path, Filename); @@ -2775,8 +2782,6 @@ if ((settings_dest != RND_CFR_invalid) && (retval == 0)) { /* overwrite settings from the flags, mark them not-to-save */ - rnd_conf_reset(settings_dest, ""); - rnd_conf_main_root_replace_cnt[settings_dest]++; CONF_SET(settings_dest, "plugins/mincut/enable", -1, CONF_BOOL_FLAG(PCB_ENABLEPCB_FLAG_MINCUT, yy_pcb_flags), RND_POL_OVERWRITE); CONF_SET(settings_dest, "editor/show_number", -1, CONF_BOOL_FLAG(PCB_SHOWNUMBERFLAG, yy_pcb_flags), RND_POL_OVERWRITE); CONF_SET(settings_dest, "editor/show_drc", -1, CONF_BOOL_FLAG(PCB_SHOWPCB_FLAG_DRC, yy_pcb_flags), RND_POL_OVERWRITE); Index: parse_l.l =================================================================== --- parse_l.l (revision 38648) +++ parse_l.l (revision 38649) @@ -386,6 +386,13 @@ io_pcb_preproc_board(PCB); + if (settings_dest != RND_CFR_invalid) { + /* Parse() will set items in settings_dest, reset before that so + values from the previous design won't leak in */ + rnd_conf_reset(settings_dest, ""); + rnd_conf_main_root_replace_cnt[settings_dest]++; + } + pcb_data_clip_inhibit_inc(PCB->Data); fcmd = conf_core.rc.file_command; retval = Parse(NULL, fcmd, conf_core.rc.file_path, Filename); @@ -392,8 +399,6 @@ if ((settings_dest != RND_CFR_invalid) && (retval == 0)) { /* overwrite settings from the flags, mark them not-to-save */ - rnd_conf_reset(settings_dest, ""); - rnd_conf_main_root_replace_cnt[settings_dest]++; CONF_SET(settings_dest, "plugins/mincut/enable", -1, CONF_BOOL_FLAG(PCB_ENABLEPCB_FLAG_MINCUT, yy_pcb_flags), RND_POL_OVERWRITE); CONF_SET(settings_dest, "editor/show_number", -1, CONF_BOOL_FLAG(PCB_SHOWNUMBERFLAG, yy_pcb_flags), RND_POL_OVERWRITE); CONF_SET(settings_dest, "editor/show_drc", -1, CONF_BOOL_FLAG(PCB_SHOWPCB_FLAG_DRC, yy_pcb_flags), RND_POL_OVERWRITE);