Greatly simplify the SimulationViewProxy

This commit is contained in:
Jaime van Kessel 2019-08-27 13:03:23 +02:00
parent ced14c7daf
commit 9c2f8a94d5
2 changed files with 60 additions and 124 deletions

View file

@ -84,7 +84,7 @@ class SimulationView(CuraView):
self._old_composite_shader = None # type: Optional["ShaderProgram"]
self._global_container_stack = None # type: Optional[ContainerStack]
self._proxy = SimulationViewProxy()
self._proxy = None
self._controller.getScene().getRoot().childrenChanged.connect(self._onSceneChanged)
self._resetSettings()
@ -441,6 +441,8 @@ class SimulationView(CuraView):
## Hackish way to ensure the proxy is already created, which ensures that the layerview.qml is already created
# as this caused some issues.
def getProxy(self, engine, script_engine):
if self._proxy is None:
self._proxy = SimulationViewProxy(self)
return self._proxy
def endRendering(self) -> None: