From 9efc2ee97319c94e04fb957b51ee01b0aa6040d0 Mon Sep 17 00:00:00 2001 From: Jack Ha Date: Mon, 11 Jul 2016 13:36:23 +0200 Subject: [PATCH 1/2] Added message when switching to one_at_a_time. CURA-1787 --- cura/BuildVolume.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cura/BuildVolume.py b/cura/BuildVolume.py index efc306c32d..091ba8bb42 100644 --- a/cura/BuildVolume.py +++ b/cura/BuildVolume.py @@ -1,6 +1,7 @@ # Copyright (c) 2015 Ultimaker B.V. # Cura is released under the terms of the AGPLv3 or higher. +from UM.i18n import i18nCatalog from UM.Scene.SceneNode import SceneNode from UM.Application import Application from UM.Resources import Resources @@ -9,9 +10,11 @@ from UM.Math.Vector import Vector from UM.Math.Color import Color from UM.Math.AxisAlignedBox import AxisAlignedBox from UM.Math.Polygon import Polygon +from UM.Message import Message from UM.View.RenderBatch import RenderBatch from UM.View.GL.OpenGL import OpenGL +catalog = i18nCatalog("cura") import numpy @@ -189,6 +192,11 @@ class BuildVolume(SceneNode): if setting_key == "print_sequence": if Application.getInstance().getGlobalContainerStack().getProperty("print_sequence", "value") == "one_at_a_time": self._height = self._active_container_stack.getProperty("gantry_height", "value") + Message(catalog.i18nc( + "@info:status", + "The build volume height has been reduced due to the value of the" + " \"Print Sequence\" setting to prevent the gantry from colliding" + " with printed objects."), lifetime=10).show() else: self._height = self._active_container_stack.getProperty("machine_height", "value") self.rebuild() From 2798b73d3234328023a2ab796a90f726e4c5a106 Mon Sep 17 00:00:00 2001 From: Jack Ha Date: Mon, 11 Jul 2016 15:12:08 +0200 Subject: [PATCH 2/2] Also display build volume message _onGlobalContainerStackChanged CURA-1787 --- cura/BuildVolume.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/cura/BuildVolume.py b/cura/BuildVolume.py index 091ba8bb42..b438365f78 100644 --- a/cura/BuildVolume.py +++ b/cura/BuildVolume.py @@ -165,6 +165,13 @@ class BuildVolume(SceneNode): def getBoundingBox(self): return self._volume_aabb + def _buildVolumeMessage(self): + Message(catalog.i18nc( + "@info:status", + "The build volume height has been reduced due to the value of the" + " \"Print Sequence\" setting to prevent the gantry from colliding" + " with printed objects."), lifetime=10).show() + def _onGlobalContainerStackChanged(self): if self._active_container_stack: self._active_container_stack.propertyChanged.disconnect(self._onSettingPropertyChanged) @@ -177,6 +184,7 @@ class BuildVolume(SceneNode): self._width = self._active_container_stack.getProperty("machine_width", "value") if self._active_container_stack.getProperty("print_sequence", "value") == "one_at_a_time": self._height = self._active_container_stack.getProperty("gantry_height", "value") + self._buildVolumeMessage() else: self._height = self._active_container_stack.getProperty("machine_height", "value") self._depth = self._active_container_stack.getProperty("machine_depth", "value") @@ -192,11 +200,7 @@ class BuildVolume(SceneNode): if setting_key == "print_sequence": if Application.getInstance().getGlobalContainerStack().getProperty("print_sequence", "value") == "one_at_a_time": self._height = self._active_container_stack.getProperty("gantry_height", "value") - Message(catalog.i18nc( - "@info:status", - "The build volume height has been reduced due to the value of the" - " \"Print Sequence\" setting to prevent the gantry from colliding" - " with printed objects."), lifetime=10).show() + self._buildVolumeMessage() else: self._height = self._active_container_stack.getProperty("machine_height", "value") self.rebuild()