From e0382a102f5355a1ed76587d9ba110199e676c14 Mon Sep 17 00:00:00 2001 From: tatiana Date: Mon, 11 Jan 2010 16:05:17 +0000 Subject: [PATCH] FIX: Error while creating surface under darwin --- invesalius/data/surface.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/invesalius/data/surface.py b/invesalius/data/surface.py index 37bf290..26fa099 100644 --- a/invesalius/data/surface.py +++ b/invesalius/data/surface.py @@ -272,7 +272,7 @@ class SurfaceManager(): Create surface actor, save into project and send it to viewer. """ imagedata, colour, [min_value, max_value], edited_points = pubsub_evt.data - quality='Optimal' + quality=_('Optimal *') mode = 'CONTOUR' # 'GRAYSCALE' imagedata_tmp = None @@ -359,13 +359,17 @@ class SurfaceManager(): # Set actor colour and transparency actor.GetProperty().SetColor(colour) actor.GetProperty().SetOpacity(1-surface.transparency) - - try: - #Remove all temp file + + # Remove temporary files + if sys.platform == "win32": + try: + os.remove(filename_img) + os.remove(filename_polydata) + except (WindowsError): + print "Error while removing surface temporary file" + else: os.remove(filename_img) os.remove(filename_polydata) - except(WindowsError): - print "Error remove temp file" # Append surface into Project.surface_dict proj = prj.Project() -- libgit2 0.21.2