Index: src/action.c =================================================================== --- src/action.c (revision 1024) +++ src/action.c (revision 1025) @@ -5573,7 +5573,7 @@ else if (strcasecmp(function, "Layout") == 0) { if (!PCB->Changed || gui->confirm_dialog(_("OK to override layout data?"), 0)) - LoadPCB(name, true); + LoadPCB(name, true, false); } else if (strcasecmp(function, "Netlist") == 0) { Index: src/command.c =================================================================== --- src/command.c (revision 1024) +++ src/command.c (revision 1025) @@ -133,7 +133,7 @@ } if (!PCB->Changed || gui->confirm_dialog("OK to override layout data?", 0)) - LoadPCB(filename, true); + LoadPCB(filename, true, false); free(name); return (0); } Index: src/create.c =================================================================== --- src/create.c (revision 1024) +++ src/create.c (revision 1025) @@ -212,7 +212,7 @@ old = PCB; PCB = NULL; - if ((LoadPCB(Settings.DefaultPcbFile, false) == 0) || (LoadPCB(PCB_DEFAULT_PCB_FILE_SRC, false) == 0)) { + if ((LoadPCB(Settings.DefaultPcbFile, false, true) == 0) || (LoadPCB(PCB_DEFAULT_PCB_FILE_SRC, false, true) == 0)) { nw = PCB; if (nw->Filename != NULL) { /* make sure the new PCB doesn't inherit the name of the default pcb */ Index: src/file.c =================================================================== --- src/file.c (revision 1024) +++ src/file.c (revision 1025) @@ -366,7 +366,7 @@ * If revert is true, we pass "revert" as a parameter * to the HID's PCBChanged action. */ -static int real_load_pcb(char *Filename, bool revert, bool require_font) +static int real_load_pcb(char *Filename, bool revert, bool require_font, bool is_misc) { const char *unit_suffix; char *new_filename; @@ -394,12 +394,14 @@ CreateNewPCBPost(PCB, 0); ResetStackAndVisibility(); - /* update cursor location */ - Crosshair.X = CLAMP(PCB->CursorX, 0, PCB->MaxWidth); - Crosshair.Y = CLAMP(PCB->CursorY, 0, PCB->MaxHeight); + if (!is_misc) { + /* update cursor location */ + Crosshair.X = CLAMP(PCB->CursorX, 0, PCB->MaxWidth); + Crosshair.Y = CLAMP(PCB->CursorY, 0, PCB->MaxHeight); - /* update cursor confinement and output area (scrollbars) */ - ChangePCBSize(PCB->MaxWidth, PCB->MaxHeight); + /* update cursor confinement and output area (scrollbars) */ + ChangePCBSize(PCB->MaxWidth, PCB->MaxHeight); + } /* enable default font if necessary */ if (!PCB->Font.Valid) { @@ -427,10 +429,12 @@ set_some_route_style(); - if (revert) - hid_actionl("PCBChanged", "revert", NULL); - else - hid_action("PCBChanged"); + if (!is_misc) { + if (revert) + hid_actionl("PCBChanged", "revert", NULL); + else + hid_action("PCBChanged"); + } #ifdef DEBUG end = clock(); @@ -451,9 +455,9 @@ /* --------------------------------------------------------------------------- * Load PCB */ -int LoadPCB(char *file, bool require_font) +int LoadPCB(char *file, bool require_font, bool is_misc) { - return real_load_pcb(file, false, require_font); + return real_load_pcb(file, false, require_font, is_misc); } /* --------------------------------------------------------------------------- @@ -461,7 +465,7 @@ */ int RevertPCB(void) { - return real_load_pcb(PCB->Filename, true, true); + return real_load_pcb(PCB->Filename, true, true, true); } /* --------------------------------------------------------------------------- Index: src/file.h =================================================================== --- src/file.h (revision 1024) +++ src/file.h (revision 1025) @@ -36,7 +36,7 @@ FILE *CheckAndOpenFile(char *, bool, bool, bool *, bool *); FILE *OpenConnectionDataFile(void); int SavePCB(char *); -int LoadPCB(char *, bool); +int LoadPCB(char *, bool, bool); int RevertPCB(void); void EnableAutosave(void); void Backup(void); Index: src/main.c =================================================================== --- src/main.c (revision 1024) +++ src/main.c (revision 1025) @@ -1713,7 +1713,7 @@ /* keep filename even if initial load command failed; * file might not exist */ - if (LoadPCB(command_line_pcb, true)) + if (LoadPCB(command_line_pcb, true, false)) PCB->Filename = strdup(command_line_pcb); }