Index: trunk/src_plugins/fontmode/fontmode.c =================================================================== --- trunk/src_plugins/fontmode/fontmode.c (revision 36646) +++ trunk/src_plugins/fontmode/fontmode.c (revision 36647) @@ -409,8 +409,16 @@ pcb_font_t *font; pcb_layer_t *lfont, *lorig, *lwidth, *lgrid, *lsilk; rnd_layergrp_id_t grp[4]; - int l; + int l, inplace = 0; + const char *opt = ""; + RND_ACT_MAY_CONVARG(1, FGW_STR, FontEdit, opt = argv[1].val.str); + + /* this undocumented feature is used by io_lihata to avoid creating a new + board from within loading a new board */ + if (strcmp(opt, "inplace") == 0) + inplace = 1; + if (pcb->Changed && (rnd_hid_message_box(RND_ACT_HIDLIB, "warning", "Switching to fontedit", "OK to lose unsaved edits on this board?", "cancel", 0, "yes", 1, NULL) != 1)) { RND_ACT_IRES(-1); return 0; @@ -422,13 +430,15 @@ return 1; } - /* don't ask for losing changes twice */ - pcb->Changed = 0; + if (!inplace) { + /* don't ask for losing changes twice */ + pcb->Changed = 0; - if (rnd_actionva(RND_ACT_HIDLIB, "New", "Font", 0)) - return 1; + if (rnd_actionva(RND_ACT_HIDLIB, "New", "Font", 0)) + return 1; - pcb = PCB; /* our new board created above */ + pcb = PCB; /* our new board created above */ + } rnd_conf_set(RND_CFR_DESIGN, "editor/grid_unit", -1, "mil", RND_POL_OVERWRITE); rnd_conf_set_design("design/min_wid", "%s", "1"); Index: trunk/src_plugins/io_lihata/read.c =================================================================== --- trunk/src_plugins/io_lihata/read.c (revision 36646) +++ trunk/src_plugins/io_lihata/read.c (revision 36647) @@ -2716,7 +2716,7 @@ } else { rnd_conf_set(RND_CFR_DESIGN, "design/text_font_id", 0, "1", RND_POL_OVERWRITE); - if (rnd_actionva(&Ptr->hidlib, "fontedit", NULL) != 0) { + if (rnd_actionva(&Ptr->hidlib, "fontedit", "inplace", NULL) != 0) { rnd_message(RND_MSG_ERROR, "io_lihata: failed to start the font editor\n"); res = -1; }