From 15f3a3168a91fd39d1805834b27ff67626b5cf08 Mon Sep 17 00:00:00 2001 From: Marijn van Vliet Date: Fri, 5 Nov 2021 10:19:20 +0200 Subject: [PATCH] Set force_opaque when adding annotations to Brain --- surfer/viz.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/surfer/viz.py b/surfer/viz.py index e42c491..b54781c 100644 --- a/surfer/viz.py +++ b/surfer/viz.py @@ -3372,6 +3372,10 @@ def add_annotation(self, annot, ids, cmap, **kwargs): l_m = surf.module_manager.scalar_lut_manager l_m.lut.table = np.round(cmap).astype(np.uint8) + # There is a bug on some graphics cards concerning overlays that is + # fixed by setting force_opaque. + surf.actor.actor.force_opaque = True + # Set the brain attributes return dict(surface=surf, name=annot, colormap=cmap, brain=self, array_id=array_id)