Skip to content

Commit f023b8a

Browse files
MacOs fix for start button.
1 parent e4b5a46 commit f023b8a

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

src/Core/Rendering/VedoVisualizer.py

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from typing import Dict, Optional, Any, Tuple
22
from numpy import array, ndarray
33
from vedo import show, Plotter
4+
from platform import system
45

56
from SSD.Core.Storage.Database import Database
67
from SSD.Core.Rendering.VedoActor import VedoActor
@@ -144,16 +145,17 @@ def init_visualizer(self):
144145
plt.addButton(plt.interactor.TerminateApp, states=["start"])
145146
plt.interactive()
146147
# Once the user closed the window, recreate a new Plotter
147-
camera = {'pos': plt.camera.GetPosition(),
148-
'focalPoint': plt.camera.GetFocalPoint()}
149-
self.__plotter = show(actors,
150-
new=True,
151-
N=len(actors),
152-
sharecam=True,
153-
interactive=False,
154-
title='SofaVedo',
155-
axes=plt.axes,
156-
camera=camera)
148+
if system() != 'Darwin':
149+
camera = {'pos': plt.camera.GetPosition(),
150+
'focalPoint': plt.camera.GetFocalPoint()}
151+
self.__plotter = show(actors,
152+
new=True,
153+
N=len(actors),
154+
sharecam=True,
155+
interactive=False,
156+
title='SofaVedo',
157+
axes=plt.axes,
158+
camera=camera)
157159

158160
def update_instance(self,
159161
table_name: str,

0 commit comments

Comments
 (0)