mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-25 15:44:04 -06:00
Merge branch 'CURA-4062_layerview_laggy'
This commit is contained in:
commit
7f76749e2c
4 changed files with 8 additions and 6 deletions
|
@ -112,7 +112,6 @@ class LayerView(View):
|
|||
self._layer_pass = LayerPass.LayerPass(1, 1)
|
||||
self._compatibility_mode = OpenGLContext.isLegacyOpenGL() or bool(Preferences.getInstance().getValue("view/force_layer_view_compatibility_mode"))
|
||||
self._layer_pass.setLayerView(self)
|
||||
self.getRenderer().addRenderPass(self._layer_pass)
|
||||
return self._layer_pass
|
||||
|
||||
def getCurrentLayer(self):
|
||||
|
@ -310,7 +309,8 @@ class LayerView(View):
|
|||
|
||||
if event.type == Event.ViewActivateEvent:
|
||||
# Make sure the LayerPass is created
|
||||
self.getLayerPass()
|
||||
layer_pass = self.getLayerPass()
|
||||
self.getRenderer().addRenderPass(layer_pass)
|
||||
|
||||
Application.getInstance().globalContainerStackChanged.connect(self._onGlobalStackChanged)
|
||||
self._onGlobalStackChanged()
|
||||
|
@ -335,6 +335,7 @@ class LayerView(View):
|
|||
if self._global_container_stack:
|
||||
self._global_container_stack.propertyChanged.disconnect(self._onPropertyChanged)
|
||||
|
||||
self.getRenderer().removeRenderPass(self._layer_pass)
|
||||
self._composite_pass.setLayerBindings(self._old_layer_bindings)
|
||||
self._composite_pass.setCompositeShader(self._old_composite_shader)
|
||||
|
||||
|
|
|
@ -56,6 +56,7 @@ class XRayView(View):
|
|||
# Currently the RenderPass constructor requires a size > 0
|
||||
# This should be fixed in RenderPass's constructor.
|
||||
self._xray_pass = XRayPass.XRayPass(1, 1)
|
||||
|
||||
self.getRenderer().addRenderPass(self._xray_pass)
|
||||
|
||||
if not self._xray_composite_shader:
|
||||
|
@ -74,5 +75,6 @@ class XRayView(View):
|
|||
self._composite_pass.setCompositeShader(self._xray_composite_shader)
|
||||
|
||||
if event.type == Event.ViewDeactivateEvent:
|
||||
self.getRenderer().removeRenderPass(self._xray_pass)
|
||||
self._composite_pass.setLayerBindings(self._old_layer_bindings)
|
||||
self._composite_pass.setCompositeShader(self._old_composite_shader)
|
||||
|
|
|
@ -344,9 +344,6 @@ UM.MainWindow
|
|||
{
|
||||
id: toolbar;
|
||||
|
||||
property int mouseX: base.mouseX
|
||||
property int mouseY: base.mouseY
|
||||
|
||||
anchors {
|
||||
top: openFileButton.bottom;
|
||||
topMargin: UM.Theme.getSize("window_margin").height;
|
||||
|
|
|
@ -30,9 +30,11 @@ Rectangle
|
|||
Component.onCompleted: {
|
||||
startMonitoringPrint.connect(function () {
|
||||
base.monitoringPrint = true
|
||||
UM.Controller.disableModelRendering()
|
||||
})
|
||||
stopMonitoringPrint.connect(function () {
|
||||
base.monitoringPrint = false
|
||||
UM.Controller.enableModelRendering()
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue