From f6ac1999ddf7b0b7cccfafdf1c859374e6ae8ada Mon Sep 17 00:00:00 2001 From: Vincent Smeets Date: Sun, 12 Feb 2023 19:54:04 +0100 Subject: [PATCH] HtmlDoc: Create a unique filename for cropped images --- gramps/plugins/docgen/htmldoc.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gramps/plugins/docgen/htmldoc.py b/gramps/plugins/docgen/htmldoc.py index 6f2111020..f067099b7 100644 --- a/gramps/plugins/docgen/htmldoc.py +++ b/gramps/plugins/docgen/htmldoc.py @@ -556,7 +556,10 @@ class HtmlDoc(BaseDoc, TextDoc): """ self._empty = 0 size = int(max(w_cm, h_cm) * float(150.0/2.54)) - refname = "is%s" % os.path.basename(name) + if crop: + refname = "is-%d-%d-%d-%d-%s" % (crop[0], crop[1], crop[2], crop[3], os.path.basename(name)) + else: + refname = "is%s" % os.path.basename(name) imdir = self._backend.datadirfull()