From 9ab3cad8a1893324f405af1ec700c13fd77a758e Mon Sep 17 00:00:00 2001 From: stefan schippers Date: Fri, 19 Dec 2025 13:06:57 +0100 Subject: [PATCH] merge_file: do not start move_objects(RUBBER,...) if nothing to merge found --- src/paste.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/paste.c b/src/paste.c index fd59a72f..885d15c2 100644 --- a/src/paste.c +++ b/src/paste.c @@ -465,9 +465,11 @@ void merge_file(int selection_load, const char ext[]) dbg(1, "End merge_file(): loaded file %s: wire=%d inst=%d ui_state=%ld\n", name, xctx->wires , xctx->instances, xctx->ui_state); move_objects(START,0,0,0); - xctx->mousex_snap = xctx->mx_double_save; - xctx->mousey_snap = xctx->my_double_save; - if(rubber) move_objects(RUBBER,0,0,0); + if(xctx->lastsel) { + xctx->mousex_snap = xctx->mx_double_save; + xctx->mousey_snap = xctx->my_double_save; + if(rubber) move_objects(RUBBER,0,0,0); + } } else { dbg(0, "merge_file(): can not open %s\n", name); xctx->paste_from = 0;