mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Reduce the creations of ExtrudersModels
CURA-6015
This commit is contained in:
parent
2cf80b4578
commit
620790ae3d
15 changed files with 44 additions and 34 deletions
|
@ -12,7 +12,6 @@ from UM.Math.Color import Color
|
|||
from UM.View.GL.OpenGL import OpenGL
|
||||
|
||||
from cura.Settings.ExtruderManager import ExtruderManager
|
||||
from cura.Settings.ExtrudersModel import ExtrudersModel
|
||||
|
||||
import math
|
||||
|
||||
|
@ -29,13 +28,16 @@ class SolidView(View):
|
|||
self._non_printing_shader = None
|
||||
self._support_mesh_shader = None
|
||||
|
||||
self._extruders_model = ExtrudersModel()
|
||||
self._extruders_model = None
|
||||
self._theme = None
|
||||
|
||||
def beginRendering(self):
|
||||
scene = self.getController().getScene()
|
||||
renderer = self.getRenderer()
|
||||
|
||||
if not self._extruders_model:
|
||||
self._extruders_model = Application.getInstance().getExtrudersModel()
|
||||
|
||||
if not self._theme:
|
||||
self._theme = Application.getInstance().getTheme()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue