summaryrefslogtreecommitdiff
path: root/Build/source/utils/asymptote/drawclipend.h
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/utils/asymptote/drawclipend.h')
-rw-r--r--Build/source/utils/asymptote/drawclipend.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/Build/source/utils/asymptote/drawclipend.h b/Build/source/utils/asymptote/drawclipend.h
index 098d4dac8eb..4b2d3260f2c 100644
--- a/Build/source/utils/asymptote/drawclipend.h
+++ b/Build/source/utils/asymptote/drawclipend.h
@@ -46,11 +46,14 @@ public:
}
bool write(texfile *out, const bbox& bpath) {
- out->verbatimline(settings::endpicture(out->texengine));
- out->verbatim("\\kern");
- double width=bpath.right-bpath.left;
- out->write(-width*ps2tex);
- out->verbatimline("pt%");
+ out->endgroup();
+ if(out->toplevel()) {
+ out->verbatimline(settings::endpicture(out->texengine));
+ out->verbatim("\\kern");
+ double width=bpath.right-bpath.left;
+ out->write(-width*ps2tex);
+ out->verbatimline("pt%");
+ }
if(grestore) out->grestore();
return true;
}