mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 23:17:32 -06:00
Fix merge conflicts with master
This commit is contained in:
commit
d19b2fb8d9
22 changed files with 135 additions and 108 deletions
|
@ -824,6 +824,7 @@ class CuraApplication(QtApplication):
|
||||||
|
|
||||||
qmlRegisterSingletonType(ObjectsModel, "Cura", 1, 2, "ObjectsModel", self.getObjectsModel)
|
qmlRegisterSingletonType(ObjectsModel, "Cura", 1, 2, "ObjectsModel", self.getObjectsModel)
|
||||||
qmlRegisterSingletonType(BuildPlateModel, "Cura", 1, 2, "BuildPlateModel", self.getBuildPlateModel)
|
qmlRegisterSingletonType(BuildPlateModel, "Cura", 1, 2, "BuildPlateModel", self.getBuildPlateModel)
|
||||||
|
qmlRegisterType(InstanceContainer, "Cura", 1, 0, "InstanceContainer")
|
||||||
qmlRegisterType(ExtrudersModel, "Cura", 1, 0, "ExtrudersModel")
|
qmlRegisterType(ExtrudersModel, "Cura", 1, 0, "ExtrudersModel")
|
||||||
qmlRegisterType(ContainerSettingsModel, "Cura", 1, 0, "ContainerSettingsModel")
|
qmlRegisterType(ContainerSettingsModel, "Cura", 1, 0, "ContainerSettingsModel")
|
||||||
qmlRegisterSingletonType(ProfilesModel, "Cura", 1, 0, "ProfilesModel", ProfilesModel.createProfilesModel)
|
qmlRegisterSingletonType(ProfilesModel, "Cura", 1, 0, "ProfilesModel", ProfilesModel.createProfilesModel)
|
||||||
|
@ -921,6 +922,7 @@ class CuraApplication(QtApplication):
|
||||||
not issubclass(type(node), CuraSceneNode) or
|
not issubclass(type(node), CuraSceneNode) or
|
||||||
(not node.getMeshData() and not node.callDecoration("getLayerData")) or
|
(not node.getMeshData() and not node.callDecoration("getLayerData")) or
|
||||||
(node.callDecoration("getBuildPlateNumber") != active_build_plate)):
|
(node.callDecoration("getBuildPlateNumber") != active_build_plate)):
|
||||||
|
|
||||||
continue
|
continue
|
||||||
if node.callDecoration("isBlockSlicing"):
|
if node.callDecoration("isBlockSlicing"):
|
||||||
is_block_slicing_node = True
|
is_block_slicing_node = True
|
||||||
|
@ -1037,7 +1039,7 @@ class CuraApplication(QtApplication):
|
||||||
|
|
||||||
Selection.clear()
|
Selection.clear()
|
||||||
for node in DepthFirstIterator(self.getController().getScene().getRoot()):
|
for node in DepthFirstIterator(self.getController().getScene().getRoot()):
|
||||||
if not issubclass(type(node), SceneNode):
|
if not isinstance(node, SceneNode):
|
||||||
continue
|
continue
|
||||||
if not node.getMeshData() and not node.callDecoration("isGroup"):
|
if not node.getMeshData() and not node.callDecoration("isGroup"):
|
||||||
continue # Node that doesnt have a mesh and is not a group.
|
continue # Node that doesnt have a mesh and is not a group.
|
||||||
|
@ -1059,10 +1061,12 @@ class CuraApplication(QtApplication):
|
||||||
|
|
||||||
nodes = []
|
nodes = []
|
||||||
for node in DepthFirstIterator(self.getController().getScene().getRoot()):
|
for node in DepthFirstIterator(self.getController().getScene().getRoot()):
|
||||||
if type(node) not in {SceneNode, CuraSceneNode}:
|
if not isinstance(node, SceneNode):
|
||||||
continue
|
continue
|
||||||
if (not node.getMeshData() and not node.callDecoration("getLayerData")) and not node.callDecoration("isGroup"):
|
if (not node.getMeshData() and not node.callDecoration("getLayerData")) and not node.callDecoration("isGroup"):
|
||||||
continue # Node that doesnt have a mesh and is not a group.
|
continue # Node that doesnt have a mesh and is not a group.
|
||||||
|
if not node.isSelectable():
|
||||||
|
continue # Only remove nodes that are selectable.
|
||||||
if node.getParent() and node.getParent().callDecoration("isGroup"):
|
if node.getParent() and node.getParent().callDecoration("isGroup"):
|
||||||
continue # Grouped nodes don't need resetting as their parent (the group) is resetted)
|
continue # Grouped nodes don't need resetting as their parent (the group) is resetted)
|
||||||
nodes.append(node)
|
nodes.append(node)
|
||||||
|
@ -1075,7 +1079,11 @@ class CuraApplication(QtApplication):
|
||||||
op.push()
|
op.push()
|
||||||
Selection.clear()
|
Selection.clear()
|
||||||
|
|
||||||
self.getCuraSceneController().setActiveBuildPlate(0) # Select first build plate
|
Logger.log("i", "Reseting print information")
|
||||||
|
self._print_information = PrintInformation.PrintInformation()
|
||||||
|
|
||||||
|
# stay on the same build plate
|
||||||
|
#self.getCuraSceneController().setActiveBuildPlate(0) # Select first build plate
|
||||||
|
|
||||||
## Reset all translation on nodes with mesh data.
|
## Reset all translation on nodes with mesh data.
|
||||||
@pyqtSlot()
|
@pyqtSlot()
|
||||||
|
@ -1083,7 +1091,7 @@ class CuraApplication(QtApplication):
|
||||||
Logger.log("i", "Resetting all scene translations")
|
Logger.log("i", "Resetting all scene translations")
|
||||||
nodes = []
|
nodes = []
|
||||||
for node in DepthFirstIterator(self.getController().getScene().getRoot()):
|
for node in DepthFirstIterator(self.getController().getScene().getRoot()):
|
||||||
if not issubclass(type(node), SceneNode):
|
if not isinstance(node, SceneNode):
|
||||||
continue
|
continue
|
||||||
if not node.getMeshData() and not node.callDecoration("isGroup"):
|
if not node.getMeshData() and not node.callDecoration("isGroup"):
|
||||||
continue # Node that doesnt have a mesh and is not a group.
|
continue # Node that doesnt have a mesh and is not a group.
|
||||||
|
@ -1111,7 +1119,7 @@ class CuraApplication(QtApplication):
|
||||||
Logger.log("i", "Resetting all scene transformations")
|
Logger.log("i", "Resetting all scene transformations")
|
||||||
nodes = []
|
nodes = []
|
||||||
for node in DepthFirstIterator(self.getController().getScene().getRoot()):
|
for node in DepthFirstIterator(self.getController().getScene().getRoot()):
|
||||||
if not issubclass(type(node), SceneNode):
|
if not isinstance(node, SceneNode):
|
||||||
continue
|
continue
|
||||||
if not node.getMeshData() and not node.callDecoration("isGroup"):
|
if not node.getMeshData() and not node.callDecoration("isGroup"):
|
||||||
continue # Node that doesnt have a mesh and is not a group.
|
continue # Node that doesnt have a mesh and is not a group.
|
||||||
|
@ -1138,7 +1146,7 @@ class CuraApplication(QtApplication):
|
||||||
def arrangeObjectsToAllBuildPlates(self):
|
def arrangeObjectsToAllBuildPlates(self):
|
||||||
nodes = []
|
nodes = []
|
||||||
for node in DepthFirstIterator(self.getController().getScene().getRoot()):
|
for node in DepthFirstIterator(self.getController().getScene().getRoot()):
|
||||||
if not issubclass(type(node), SceneNode):
|
if not isinstance(node, SceneNode):
|
||||||
continue
|
continue
|
||||||
if not node.getMeshData() and not node.callDecoration("isGroup"):
|
if not node.getMeshData() and not node.callDecoration("isGroup"):
|
||||||
continue # Node that doesnt have a mesh and is not a group.
|
continue # Node that doesnt have a mesh and is not a group.
|
||||||
|
@ -1159,7 +1167,7 @@ class CuraApplication(QtApplication):
|
||||||
nodes = []
|
nodes = []
|
||||||
active_build_plate = self.getBuildPlateModel().activeBuildPlate
|
active_build_plate = self.getBuildPlateModel().activeBuildPlate
|
||||||
for node in DepthFirstIterator(self.getController().getScene().getRoot()):
|
for node in DepthFirstIterator(self.getController().getScene().getRoot()):
|
||||||
if not issubclass(type(node), SceneNode):
|
if not isinstance(node, SceneNode):
|
||||||
continue
|
continue
|
||||||
if not node.getMeshData() and not node.callDecoration("isGroup"):
|
if not node.getMeshData() and not node.callDecoration("isGroup"):
|
||||||
continue # Node that doesnt have a mesh and is not a group.
|
continue # Node that doesnt have a mesh and is not a group.
|
||||||
|
@ -1183,7 +1191,7 @@ class CuraApplication(QtApplication):
|
||||||
# What nodes are on the build plate and are not being moved
|
# What nodes are on the build plate and are not being moved
|
||||||
fixed_nodes = []
|
fixed_nodes = []
|
||||||
for node in DepthFirstIterator(self.getController().getScene().getRoot()):
|
for node in DepthFirstIterator(self.getController().getScene().getRoot()):
|
||||||
if not issubclass(type(node), SceneNode):
|
if not isinstance(node, SceneNode):
|
||||||
continue
|
continue
|
||||||
if not node.getMeshData() and not node.callDecoration("isGroup"):
|
if not node.getMeshData() and not node.callDecoration("isGroup"):
|
||||||
continue # Node that doesnt have a mesh and is not a group.
|
continue # Node that doesnt have a mesh and is not a group.
|
||||||
|
@ -1211,7 +1219,7 @@ class CuraApplication(QtApplication):
|
||||||
Logger.log("i", "Reloading all loaded mesh data.")
|
Logger.log("i", "Reloading all loaded mesh data.")
|
||||||
nodes = []
|
nodes = []
|
||||||
for node in DepthFirstIterator(self.getController().getScene().getRoot()):
|
for node in DepthFirstIterator(self.getController().getScene().getRoot()):
|
||||||
if not issubclass(type(node), SceneNode) or not node.getMeshData():
|
if not isinstance(node, SceneNode) or not node.getMeshData():
|
||||||
continue
|
continue
|
||||||
|
|
||||||
nodes.append(node)
|
nodes.append(node)
|
||||||
|
|
|
@ -28,7 +28,7 @@ class ObjectsModel(ListModel):
|
||||||
active_build_plate_number = self._build_plate_number
|
active_build_plate_number = self._build_plate_number
|
||||||
group_nr = 1
|
group_nr = 1
|
||||||
for node in DepthFirstIterator(Application.getInstance().getController().getScene().getRoot()):
|
for node in DepthFirstIterator(Application.getInstance().getController().getScene().getRoot()):
|
||||||
if not issubclass(type(node), SceneNode):
|
if not isinstance(node, SceneNode):
|
||||||
continue
|
continue
|
||||||
if (not node.getMeshData() and not node.callDecoration("getLayerData")) and not node.callDecoration("isGroup"):
|
if (not node.getMeshData() and not node.callDecoration("getLayerData")) and not node.callDecoration("isGroup"):
|
||||||
continue
|
continue
|
||||||
|
|
|
@ -61,7 +61,7 @@ class PlatformPhysics:
|
||||||
|
|
||||||
random.shuffle(nodes)
|
random.shuffle(nodes)
|
||||||
for node in nodes:
|
for node in nodes:
|
||||||
if node is root or not issubclass(type(node), SceneNode) or node.getBoundingBox() is None:
|
if node is root or not isinstance(node, SceneNode) or node.getBoundingBox() is None:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
bbox = node.getBoundingBox()
|
bbox = node.getBoundingBox()
|
||||||
|
|
|
@ -136,6 +136,9 @@ class QualityManager:
|
||||||
if basic_materials:
|
if basic_materials:
|
||||||
result = self._getFilteredContainersForStack(machine_definition, basic_materials, **criteria)
|
result = self._getFilteredContainersForStack(machine_definition, basic_materials, **criteria)
|
||||||
|
|
||||||
|
empty_quality = ContainerRegistry.getInstance().findInstanceContainers(id = "empty_quality")[0]
|
||||||
|
result.append(empty_quality)
|
||||||
|
|
||||||
return result
|
return result
|
||||||
|
|
||||||
## Find all quality changes for a machine.
|
## Find all quality changes for a machine.
|
||||||
|
|
|
@ -13,7 +13,7 @@ class BuildPlateDecorator(SceneNodeDecorator):
|
||||||
# Make sure that groups are set correctly
|
# Make sure that groups are set correctly
|
||||||
# setBuildPlateForSelection in CuraActions makes sure that no single childs are set.
|
# setBuildPlateForSelection in CuraActions makes sure that no single childs are set.
|
||||||
self._build_plate_number = nr
|
self._build_plate_number = nr
|
||||||
if issubclass(type(self._node), CuraSceneNode):
|
if isinstance(self._node, CuraSceneNode):
|
||||||
self._node.transformChanged() # trigger refresh node without introducing a new signal
|
self._node.transformChanged() # trigger refresh node without introducing a new signal
|
||||||
if self._node and self._node.callDecoration("isGroup"):
|
if self._node and self._node.callDecoration("isGroup"):
|
||||||
for child in self._node.getChildren():
|
for child in self._node.getChildren():
|
||||||
|
|
|
@ -68,7 +68,7 @@ class ConvexHullNode(SceneNode):
|
||||||
ConvexHullNode.shader.setUniformValue("u_opacity", 0.6)
|
ConvexHullNode.shader.setUniformValue("u_opacity", 0.6)
|
||||||
|
|
||||||
if self.getParent():
|
if self.getParent():
|
||||||
if self.getMeshData() and issubclass(type(self._node), SceneNode) and self._node.callDecoration("getBuildPlateNumber") == Application.getInstance().getBuildPlateModel().activeBuildPlate:
|
if self.getMeshData() and isinstance(self._node, SceneNode) and self._node.callDecoration("getBuildPlateNumber") == Application.getInstance().getBuildPlateModel().activeBuildPlate:
|
||||||
renderer.queueNode(self, transparent = True, shader = ConvexHullNode.shader, backface_cull = True, sort = -8)
|
renderer.queueNode(self, transparent = True, shader = ConvexHullNode.shader, backface_cull = True, sort = -8)
|
||||||
if self._convex_hull_head_mesh:
|
if self._convex_hull_head_mesh:
|
||||||
renderer.queueNode(self, shader = ConvexHullNode.shader, transparent = True, mesh = self._convex_hull_head_mesh, backface_cull = True, sort = -8)
|
renderer.queueNode(self, shader = ConvexHullNode.shader, transparent = True, mesh = self._convex_hull_head_mesh, backface_cull = True, sort = -8)
|
||||||
|
|
|
@ -33,7 +33,7 @@ class CuraSceneController(QObject):
|
||||||
source = args[0]
|
source = args[0]
|
||||||
else:
|
else:
|
||||||
source = None
|
source = None
|
||||||
if not issubclass(type(source), SceneNode):
|
if not isinstance(source, SceneNode):
|
||||||
return
|
return
|
||||||
max_build_plate = self._calcMaxBuildPlate()
|
max_build_plate = self._calcMaxBuildPlate()
|
||||||
changed = False
|
changed = False
|
||||||
|
|
|
@ -36,6 +36,8 @@ class ProfilesModel(InstanceContainersModel):
|
||||||
Application.getInstance().getMachineManager().activeStackChanged.connect(self._update)
|
Application.getInstance().getMachineManager().activeStackChanged.connect(self._update)
|
||||||
Application.getInstance().getMachineManager().activeMaterialChanged.connect(self._update)
|
Application.getInstance().getMachineManager().activeMaterialChanged.connect(self._update)
|
||||||
|
|
||||||
|
self._empty_quality = ContainerRegistry.getInstance().findContainers(id = "empty_quality")[0]
|
||||||
|
|
||||||
# Factory function, used by QML
|
# Factory function, used by QML
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def createProfilesModel(engine, js_engine):
|
def createProfilesModel(engine, js_engine):
|
||||||
|
@ -85,13 +87,10 @@ class ProfilesModel(InstanceContainersModel):
|
||||||
if quality.getMetaDataEntry("quality_type") not in quality_type_set:
|
if quality.getMetaDataEntry("quality_type") not in quality_type_set:
|
||||||
result.append(quality)
|
result.append(quality)
|
||||||
|
|
||||||
# if still profiles are found, add a single empty_quality ("Not supported") instance to the drop down list
|
if len(result) > 1:
|
||||||
if len(result) == 0:
|
result.remove(self._empty_quality)
|
||||||
# If not qualities are found we dynamically create a not supported container for this machine + material combination
|
|
||||||
not_supported_container = ContainerRegistry.getInstance().findContainers(id = "empty_quality")[0]
|
|
||||||
result.append(not_supported_container)
|
|
||||||
|
|
||||||
return {item.getId():item for item in result}, {} #Only return true profiles for now, no metadata. The quality manager is not able to get only metadata yet.
|
return {item.getId(): item for item in result}, {} #Only return true profiles for now, no metadata. The quality manager is not able to get only metadata yet.
|
||||||
|
|
||||||
## Re-computes the items in this model, and adds the layer height role.
|
## Re-computes the items in this model, and adds the layer height role.
|
||||||
def _recomputeItems(self):
|
def _recomputeItems(self):
|
||||||
|
@ -114,7 +113,6 @@ class ProfilesModel(InstanceContainersModel):
|
||||||
# active machine and material, and later yield the right ones.
|
# active machine and material, and later yield the right ones.
|
||||||
tmp_all_quality_items = OrderedDict()
|
tmp_all_quality_items = OrderedDict()
|
||||||
for item in super()._recomputeItems():
|
for item in super()._recomputeItems():
|
||||||
|
|
||||||
profiles = container_registry.findContainersMetadata(id = item["id"])
|
profiles = container_registry.findContainersMetadata(id = item["id"])
|
||||||
if not profiles or "quality_type" not in profiles[0]:
|
if not profiles or "quality_type" not in profiles[0]:
|
||||||
quality_type = ""
|
quality_type = ""
|
||||||
|
|
|
@ -42,5 +42,7 @@ class QualityAndUserProfilesModel(ProfilesModel):
|
||||||
qc.getMetaDataEntry("extruder") == active_extruder.definition.getId())}
|
qc.getMetaDataEntry("extruder") == active_extruder.definition.getId())}
|
||||||
|
|
||||||
result = filtered_quality_changes
|
result = filtered_quality_changes
|
||||||
result.update({q.getId():q for q in quality_list})
|
for q in quality_list:
|
||||||
|
if q.getId() != "empty_quality":
|
||||||
|
result[q.getId()] = q
|
||||||
return result, {} #Only return true profiles for now, no metadata. The quality manager is not able to get only metadata yet.
|
return result, {} #Only return true profiles for now, no metadata. The quality manager is not able to get only metadata yet.
|
|
@ -1,8 +1,6 @@
|
||||||
# Copyright (c) 2017 Ultimaker B.V.
|
# Copyright (c) 2017 Ultimaker B.V.
|
||||||
# Cura is released under the terms of the LGPLv3 or higher.
|
# Cura is released under the terms of the LGPLv3 or higher.
|
||||||
|
|
||||||
import collections
|
|
||||||
|
|
||||||
from PyQt5.QtCore import pyqtProperty, pyqtSignal, Qt
|
from PyQt5.QtCore import pyqtProperty, pyqtSignal, Qt
|
||||||
|
|
||||||
from UM.Logger import Logger
|
from UM.Logger import Logger
|
||||||
|
@ -42,6 +40,8 @@ class QualitySettingsModel(UM.Qt.ListModel.ListModel):
|
||||||
self.addRoleName(self.UserValueRole, "user_value")
|
self.addRoleName(self.UserValueRole, "user_value")
|
||||||
self.addRoleName(self.CategoryRole, "category")
|
self.addRoleName(self.CategoryRole, "category")
|
||||||
|
|
||||||
|
self._empty_quality = self._container_registry.findInstanceContainers(id = "empty_quality")[0]
|
||||||
|
|
||||||
def setExtruderId(self, extruder_id):
|
def setExtruderId(self, extruder_id):
|
||||||
if extruder_id != self._extruder_id:
|
if extruder_id != self._extruder_id:
|
||||||
self._extruder_id = extruder_id
|
self._extruder_id = extruder_id
|
||||||
|
@ -107,77 +107,87 @@ class QualitySettingsModel(UM.Qt.ListModel.ListModel):
|
||||||
else:
|
else:
|
||||||
quality_changes_container = containers[0]
|
quality_changes_container = containers[0]
|
||||||
|
|
||||||
criteria = {
|
if quality_changes_container.getMetaDataEntry("quality_type") == "not_supported":
|
||||||
"type": "quality",
|
quality_container = self._empty_quality
|
||||||
"quality_type": quality_changes_container.getMetaDataEntry("quality_type"),
|
else:
|
||||||
"definition": quality_changes_container.getDefinition().getId()
|
criteria = {
|
||||||
}
|
"type": "quality",
|
||||||
|
"quality_type": quality_changes_container.getMetaDataEntry("quality_type"),
|
||||||
|
"definition": quality_changes_container.getDefinition().getId()
|
||||||
|
}
|
||||||
|
|
||||||
quality_container = self._container_registry.findInstanceContainers(**criteria)
|
quality_container = self._container_registry.findInstanceContainers(**criteria)
|
||||||
if not quality_container:
|
if not quality_container:
|
||||||
Logger.log("w", "Could not find a quality container matching quality changes %s", quality_changes_container.getId())
|
Logger.log("w", "Could not find a quality container matching quality changes %s", quality_changes_container.getId())
|
||||||
return
|
return
|
||||||
quality_container = quality_container[0]
|
|
||||||
|
quality_container = quality_container[0]
|
||||||
|
|
||||||
quality_type = quality_container.getMetaDataEntry("quality_type")
|
quality_type = quality_container.getMetaDataEntry("quality_type")
|
||||||
definition_id = Application.getInstance().getMachineManager().getQualityDefinitionId(quality_container.getDefinition())
|
|
||||||
definition = quality_container.getDefinition()
|
|
||||||
|
|
||||||
# Check if the definition container has a translation file.
|
if quality_type == "not_supported":
|
||||||
definition_suffix = ContainerRegistry.getMimeTypeForContainer(type(definition)).preferredSuffix
|
containers = []
|
||||||
catalog = i18nCatalog(os.path.basename(definition_id + "." + definition_suffix))
|
else:
|
||||||
if catalog.hasTranslationLoaded():
|
definition_id = Application.getInstance().getMachineManager().getQualityDefinitionId(quality_container.getDefinition())
|
||||||
self._i18n_catalog = catalog
|
definition = quality_container.getDefinition()
|
||||||
|
|
||||||
for file_name in quality_container.getDefinition().getInheritedFiles():
|
# Check if the definition container has a translation file.
|
||||||
catalog = i18nCatalog(os.path.basename(file_name))
|
definition_suffix = ContainerRegistry.getMimeTypeForContainer(type(definition)).preferredSuffix
|
||||||
|
catalog = i18nCatalog(os.path.basename(definition_id + "." + definition_suffix))
|
||||||
if catalog.hasTranslationLoaded():
|
if catalog.hasTranslationLoaded():
|
||||||
self._i18n_catalog = catalog
|
self._i18n_catalog = catalog
|
||||||
|
|
||||||
criteria = {"type": "quality", "quality_type": quality_type, "definition": definition_id}
|
for file_name in quality_container.getDefinition().getInheritedFiles():
|
||||||
|
catalog = i18nCatalog(os.path.basename(file_name))
|
||||||
|
if catalog.hasTranslationLoaded():
|
||||||
|
self._i18n_catalog = catalog
|
||||||
|
|
||||||
if self._material_id and self._material_id != "empty_material":
|
criteria = {"type": "quality", "quality_type": quality_type, "definition": definition_id}
|
||||||
criteria["material"] = self._material_id
|
|
||||||
|
|
||||||
criteria["extruder"] = self._extruder_id
|
if self._material_id and self._material_id != "empty_material":
|
||||||
|
criteria["material"] = self._material_id
|
||||||
|
|
||||||
containers = self._container_registry.findInstanceContainers(**criteria)
|
criteria["extruder"] = self._extruder_id
|
||||||
if not containers:
|
|
||||||
# Try again, this time without extruder
|
|
||||||
new_criteria = criteria.copy()
|
|
||||||
new_criteria.pop("extruder")
|
|
||||||
containers = self._container_registry.findInstanceContainers(**new_criteria)
|
|
||||||
|
|
||||||
if not containers and "material" in criteria:
|
|
||||||
# Try again, this time without material
|
|
||||||
criteria.pop("material", None)
|
|
||||||
containers = self._container_registry.findInstanceContainers(**criteria)
|
containers = self._container_registry.findInstanceContainers(**criteria)
|
||||||
|
if not containers:
|
||||||
|
# Try again, this time without extruder
|
||||||
|
new_criteria = criteria.copy()
|
||||||
|
new_criteria.pop("extruder")
|
||||||
|
containers = self._container_registry.findInstanceContainers(**new_criteria)
|
||||||
|
|
||||||
if not containers:
|
if not containers and "material" in criteria:
|
||||||
# Try again, this time without material or extruder
|
# Try again, this time without material
|
||||||
criteria.pop("extruder") # "material" has already been popped
|
criteria.pop("material", None)
|
||||||
containers = self._container_registry.findInstanceContainers(**criteria)
|
containers = self._container_registry.findInstanceContainers(**criteria)
|
||||||
|
|
||||||
if not containers:
|
if not containers:
|
||||||
Logger.log("w", "Could not find any quality containers matching the search criteria %s" % str(criteria))
|
# Try again, this time without material or extruder
|
||||||
return
|
criteria.pop("extruder") # "material" has already been popped
|
||||||
|
containers = self._container_registry.findInstanceContainers(**criteria)
|
||||||
|
|
||||||
|
if not containers:
|
||||||
|
Logger.log("w", "Could not find any quality containers matching the search criteria %s" % str(criteria))
|
||||||
|
return
|
||||||
|
|
||||||
if quality_changes_container:
|
if quality_changes_container:
|
||||||
criteria = {"type": "quality_changes", "quality_type": quality_type, "definition": definition_id, "name": quality_changes_container.getName()}
|
if quality_type == "not_supported":
|
||||||
if self._extruder_definition_id != "":
|
criteria = {"type": "quality_changes", "quality_type": quality_type, "name": quality_changes_container.getName()}
|
||||||
extruder_definitions = self._container_registry.findDefinitionContainers(id = self._extruder_definition_id)
|
|
||||||
if extruder_definitions:
|
|
||||||
criteria["extruder"] = Application.getInstance().getMachineManager().getQualityDefinitionId(extruder_definitions[0])
|
|
||||||
criteria["name"] = quality_changes_container.getName()
|
|
||||||
else:
|
else:
|
||||||
criteria["extruder"] = None
|
criteria = {"type": "quality_changes", "quality_type": quality_type, "definition": definition_id, "name": quality_changes_container.getName()}
|
||||||
|
if self._extruder_definition_id != "":
|
||||||
|
extruder_definitions = self._container_registry.findDefinitionContainers(id = self._extruder_definition_id)
|
||||||
|
if extruder_definitions:
|
||||||
|
criteria["extruder"] = Application.getInstance().getMachineManager().getQualityDefinitionId(extruder_definitions[0])
|
||||||
|
criteria["name"] = quality_changes_container.getName()
|
||||||
|
else:
|
||||||
|
criteria["extruder"] = None
|
||||||
|
|
||||||
changes = self._container_registry.findInstanceContainers(**criteria)
|
changes = self._container_registry.findInstanceContainers(**criteria)
|
||||||
if changes:
|
if changes:
|
||||||
containers.extend(changes)
|
containers.extend(changes)
|
||||||
|
|
||||||
global_container_stack = Application.getInstance().getGlobalContainerStack()
|
global_container_stack = Application.getInstance().getGlobalContainerStack()
|
||||||
is_multi_extrusion = global_container_stack.getProperty("machine_extruder_count", "value") > 1
|
|
||||||
|
|
||||||
current_category = ""
|
current_category = ""
|
||||||
for definition in definition_container.findDefinitions():
|
for definition in definition_container.findDefinitions():
|
||||||
|
@ -213,15 +223,14 @@ class QualitySettingsModel(UM.Qt.ListModel.ListModel):
|
||||||
if profile_value is None and user_value is None:
|
if profile_value is None and user_value is None:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if is_multi_extrusion:
|
settable_per_extruder = global_container_stack.getProperty(definition.key, "settable_per_extruder")
|
||||||
settable_per_extruder = global_container_stack.getProperty(definition.key, "settable_per_extruder")
|
# If a setting is not settable per extruder (global) and we're looking at an extruder tab, don't show this value.
|
||||||
# If a setting is not settable per extruder (global) and we're looking at an extruder tab, don't show this value.
|
if self._extruder_id != "" and not settable_per_extruder:
|
||||||
if self._extruder_id != "" and not settable_per_extruder:
|
continue
|
||||||
continue
|
|
||||||
|
|
||||||
# If a setting is settable per extruder (not global) and we're looking at global tab, don't show this value.
|
# If a setting is settable per extruder (not global) and we're looking at global tab, don't show this value.
|
||||||
if self._extruder_id == "" and settable_per_extruder:
|
if self._extruder_id == "" and settable_per_extruder:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
label = definition.label
|
label = definition.label
|
||||||
if self._i18n_catalog:
|
if self._i18n_catalog:
|
||||||
|
|
|
@ -609,7 +609,7 @@ class ThreeMFWorkspaceReader(WorkspaceReader):
|
||||||
|
|
||||||
instance_container.setName(self._container_registry.uniqueName(instance_container.getName()))
|
instance_container.setName(self._container_registry.uniqueName(instance_container.getName()))
|
||||||
new_changes_container_id = self.getNewId(instance_container.getId())
|
new_changes_container_id = self.getNewId(instance_container.getId())
|
||||||
instance_container._id = new_changes_container_id
|
instance_container.setMetaDataEntry("id", new_changes_container_id)
|
||||||
|
|
||||||
# TODO: we don't know the following is correct or not, need to verify
|
# TODO: we don't know the following is correct or not, need to verify
|
||||||
# AND REFACTOR!!!
|
# AND REFACTOR!!!
|
||||||
|
|
|
@ -6,8 +6,9 @@ from UM.Math.Vector import Vector
|
||||||
from UM.Logger import Logger
|
from UM.Logger import Logger
|
||||||
from UM.Math.Matrix import Matrix
|
from UM.Math.Matrix import Matrix
|
||||||
from UM.Application import Application
|
from UM.Application import Application
|
||||||
import UM.Scene.SceneNode
|
from UM.Scene.SceneNode import SceneNode
|
||||||
from cura.Scene.CuraSceneNode import CuraSceneNode
|
|
||||||
|
from cura.CuraApplication import CuraApplication
|
||||||
|
|
||||||
import Savitar
|
import Savitar
|
||||||
|
|
||||||
|
@ -62,11 +63,15 @@ class ThreeMFWriter(MeshWriter):
|
||||||
self._store_archive = store_archive
|
self._store_archive = store_archive
|
||||||
|
|
||||||
## Convenience function that converts an Uranium SceneNode object to a SavitarSceneNode
|
## Convenience function that converts an Uranium SceneNode object to a SavitarSceneNode
|
||||||
# \returns Uranium Scenen node.
|
# \returns Uranium Scene node.
|
||||||
def _convertUMNodeToSavitarNode(self, um_node, transformation = Matrix()):
|
def _convertUMNodeToSavitarNode(self, um_node, transformation = Matrix()):
|
||||||
if type(um_node) not in [UM.Scene.SceneNode.SceneNode, CuraSceneNode]:
|
if not isinstance(um_node, SceneNode):
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
active_build_plate_nr = CuraApplication.getInstance().getBuildPlateModel().activeBuildPlate
|
||||||
|
if um_node.callDecoration("getBuildPlateNumber") != active_build_plate_nr:
|
||||||
|
return
|
||||||
|
|
||||||
savitar_node = Savitar.SceneNode()
|
savitar_node = Savitar.SceneNode()
|
||||||
|
|
||||||
node_matrix = um_node.getLocalTransformation()
|
node_matrix = um_node.getLocalTransformation()
|
||||||
|
@ -97,6 +102,9 @@ class ThreeMFWriter(MeshWriter):
|
||||||
savitar_node.setSetting(key, str(stack.getProperty(key, "value")))
|
savitar_node.setSetting(key, str(stack.getProperty(key, "value")))
|
||||||
|
|
||||||
for child_node in um_node.getChildren():
|
for child_node in um_node.getChildren():
|
||||||
|
# only save the nodes on the active build plate
|
||||||
|
if child_node.callDecoration("getBuildPlateNumber") != active_build_plate_nr:
|
||||||
|
continue
|
||||||
savitar_child_node = self._convertUMNodeToSavitarNode(child_node)
|
savitar_child_node = self._convertUMNodeToSavitarNode(child_node)
|
||||||
if savitar_child_node is not None:
|
if savitar_child_node is not None:
|
||||||
savitar_node.addChild(savitar_child_node)
|
savitar_node.addChild(savitar_child_node)
|
||||||
|
|
|
@ -423,7 +423,7 @@ class CuraEngineBackend(QObject, Backend):
|
||||||
#
|
#
|
||||||
# \param source The scene node that was changed.
|
# \param source The scene node that was changed.
|
||||||
def _onSceneChanged(self, source):
|
def _onSceneChanged(self, source):
|
||||||
if not issubclass(type(source), SceneNode):
|
if not isinstance(source, SceneNode):
|
||||||
return
|
return
|
||||||
|
|
||||||
build_plate_changed = set()
|
build_plate_changed = set()
|
||||||
|
|
|
@ -106,7 +106,7 @@ class SimulationPass(RenderPass):
|
||||||
nozzle_node = node
|
nozzle_node = node
|
||||||
nozzle_node.setVisible(False)
|
nozzle_node.setVisible(False)
|
||||||
|
|
||||||
elif issubclass(type(node), SceneNode) and (node.getMeshData() or node.callDecoration("isBlockSlicing")) and node.isVisible():
|
elif isinstance(node, SceneNode) and (node.getMeshData() or node.callDecoration("isBlockSlicing")) and node.isVisible():
|
||||||
layer_data = node.callDecoration("getLayerData")
|
layer_data = node.callDecoration("getLayerData")
|
||||||
if not layer_data:
|
if not layer_data:
|
||||||
continue
|
continue
|
||||||
|
|
|
@ -47,9 +47,9 @@
|
||||||
"default_value": 30
|
"default_value": 30
|
||||||
},
|
},
|
||||||
"machine_start_gcode": {
|
"machine_start_gcode": {
|
||||||
"default_value": ";Sliced at: {day} {date} {time}\nM104 S{material_print_temperature} ;set temperatures\nM140 S{material_bed_temperature}\nM109 S{material_print_temperature} ;wait for temperatures\nM190 S{material_bed_temperature}\nG21 ;metric values\nG90 ;absolute positioning\nM82 ;set extruder to absolute mode\nM107 ;start with the fan off\nG28 Z0 ;move Z to min endstops\nG28 X0 Y0 ;move X/Y to min endstops\nG29 ;Auto Level\nG1 Z0.6 F{travel_speed} ;move the Nozzle near the Bed\nG92 E0\nG1 Y0 ;zero the extruded length\nG1 X10 E30 F500 ;printing a Line from right to left\nG92 E0 ;zero the extruded length again\nG1 Z2\nG1 F{travel_speed}\nM117 Printing...;Put printing message on LCD screen\nM150 R255 U255 B255 P4 ;Change LED Color to white" },
|
"default_value": ";Sliced at: {day} {date} {time}\nM104 S{material_print_temperature} ;set temperatures\nM140 S{material_bed_temperature}\nM109 S{material_print_temperature} ;wait for temperatures\nM190 S{material_bed_temperature}\nG21 ;metric values\nG90 ;absolute positioning\nM82 ;set extruder to absolute mode\nM107 ;start with the fan off\nG28 Z0 ;move Z to min endstops\nG28 X0 Y0 ;move X/Y to min endstops\nG29 ;Auto Level\nG1 Z0.6 F{speed_travel} ;move the Nozzle near the Bed\nG92 E0\nG1 Y0 ;zero the extruded length\nG1 X10 E30 F500 ;printing a Line from right to left\nG92 E0 ;zero the extruded length again\nG1 Z2\nG1 F{speed_travel}\nM117 Printing...;Put printing message on LCD screen\nM150 R255 U255 B255 P4 ;Change LED Color to white" },
|
||||||
"machine_end_gcode": {
|
"machine_end_gcode": {
|
||||||
"default_value": "M104 S0 ;extruder heater off\nM140 S0 ;heated bed heater off (if you have it)\nG91 ;relative positioning\nG1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\nG1 Z+0.5 E-5 X-20 Y-20 F{travel_speed} ;move Z up a bit and retract filament even more\nG28 ;move X/Y to min endstops, so the head is out of the way\nM84 ;steppers off\nG90 ;absolute positioning"
|
"default_value": "M104 S0 ;extruder heater off\nM140 S0 ;heated bed heater off (if you have it)\nG91 ;relative positioning\nG1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\nG1 Z+0.5 E-5 X-20 Y-20 F{speed_travel} ;move Z up a bit and retract filament even more\nG28 ;move X/Y to min endstops, so the head is out of the way\nM84 ;steppers off\nG90 ;absolute positioning"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,10 +40,10 @@
|
||||||
"default_value": "RepRap"
|
"default_value": "RepRap"
|
||||||
},
|
},
|
||||||
"machine_start_gcode": {
|
"machine_start_gcode": {
|
||||||
"default_value": ";Sliced at: {day} {date} {time}\n;Basic settings: Layer height: {layer_height} Walls: {wall_thickness} Fill: {fill_density}\n;Print time: {print_time}\n;Filament used: {filament_amount}m {filament_weight}g\n;Filament cost: {filament_cost}\n;M190 S{print_bed_temperature} ;Uncomment to add your own bed temperature line\n;M109 S{print_temperature} ;Uncomment to add your own temperature line\nG21 ;metric values\nG90 ;absolute positioning\nM82 ;set extruder to absolute mode\nM107 ;start with the fan off\nG28 X0 Y0 ;move X/Y to min endstops\nG28 Z0 ;move Z to max endstops\nG1 Z115.0 F{travel_speed} ;move th e platform up 20mm\nG28 Z0 ;move Z to max endstop\nG1 Z15.0 F{travel_speed} ;move the platform down 15mm\nG92 E0 ;zero the extruded length\nG1 F200 E3 ;extrude 3mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F{travel_speed}\nM301 H1 P26.38 I2.57 D67.78\n;Put printing message on LCD screen\nM117 Printing..."
|
"default_value": ";Sliced at: {day} {date} {time}\n;Basic settings: Layer height: {layer_height} Walls: {wall_thickness} Fill: {fill_density}\n;Print time: {print_time}\n;Filament used: {filament_amount}m {filament_weight}g\n;Filament cost: {filament_cost}\n;M190 S{print_bed_temperature} ;Uncomment to add your own bed temperature line\n;M109 S{print_temperature} ;Uncomment to add your own temperature line\nG21 ;metric values\nG90 ;absolute positioning\nM82 ;set extruder to absolute mode\nM107 ;start with the fan off\nG28 X0 Y0 ;move X/Y to min endstops\nG28 Z0 ;move Z to max endstops\nG1 Z115.0 F{speed_travel} ;move th e platform up 20mm\nG28 Z0 ;move Z to max endstop\nG1 Z15.0 F{speed_travel} ;move the platform down 15mm\nG92 E0 ;zero the extruded length\nG1 F200 E3 ;extrude 3mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F{speed_travel}\nM301 H1 P26.38 I2.57 D67.78\n;Put printing message on LCD screen\nM117 Printing..."
|
||||||
},
|
},
|
||||||
"machine_end_gcode": {
|
"machine_end_gcode": {
|
||||||
"default_value": ";End GCode\nM104 S0 ;extruder heater off\nM140 S0 ;heated bed heater off (if you have it)\nG91 ;relative positioning\nG1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\nG1 Z+0.5 E-5 X-20 Y-20 F{travel_speed} ;move Z up a bit and retract filament even more\nG28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way\nG28 Z0\nM84 ;steppers off\nG90 ;absolute positioning\n;{profile_string}"
|
"default_value": ";End GCode\nM104 S0 ;extruder heater off\nM140 S0 ;heated bed heater off (if you have it)\nG91 ;relative positioning\nG1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\nG1 Z+0.5 E-5 X-20 Y-20 F{speed_travel} ;move Z up a bit and retract filament even more\nG28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way\nG28 Z0\nM84 ;steppers off\nG90 ;absolute positioning\n;{profile_string}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -46,10 +46,10 @@
|
||||||
"default_value":"RepRap (Marlin/Sprinter)"
|
"default_value":"RepRap (Marlin/Sprinter)"
|
||||||
},
|
},
|
||||||
"machine_start_gcode":{
|
"machine_start_gcode":{
|
||||||
"default_value":"G21 ;metric values\nG90 ;absolute positioning\nM82 ;set extruder to absolute mode\nM107 ;start with the fan off\nG28 X0 Y0 ;move X/Y to min endstops\nG28 Z0 ;move Z to min endstops\nG1 Z15.0 F{travel_speed} ;move the platform down 15mm\nG92 E0 ;zero the extruded length\nG1 F200 E3 ;extrude 3mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F{travel_speed}\nM117 Printing...\nG5"
|
"default_value":"G21 ;metric values\nG90 ;absolute positioning\nM82 ;set extruder to absolute mode\nM107 ;start with the fan off\nG28 X0 Y0 ;move X/Y to min endstops\nG28 Z0 ;move Z to min endstops\nG1 Z15.0 F{speed_travel} ;move the platform down 15mm\nG92 E0 ;zero the extruded length\nG1 F200 E3 ;extrude 3mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F{speed_travel}\nM117 Printing...\nG5"
|
||||||
},
|
},
|
||||||
"machine_end_gcode":{
|
"machine_end_gcode":{
|
||||||
"default_value":"M104 S0 ; turn off extruder\nM140 S0 ; turn off bed\nM84 ; disable motors\nM107\nG91 ;relative positioning\nG1 E-1 F300 ;retract the filament a bit before lifting the nozzle\nto release some of the pressure\nG1 Z+0.5 E-5 ;X-20 Y-20 F{travel_speed} ;move Z up a bit and retract filament even more\nG28 X0 ;Y0 ;move X/Y to min endstops\nso the head is out of the way\nG1 Y180 F2000\nM84 ;steppers off\nG90\nM300 P300 S4000"
|
"default_value":"M104 S0 ; turn off extruder\nM140 S0 ; turn off bed\nM84 ; disable motors\nM107\nG91 ;relative positioning\nG1 E-1 F300 ;retract the filament a bit before lifting the nozzle\nto release some of the pressure\nG1 Z+0.5 E-5 ;X-20 Y-20 F{speed_travel} ;move Z up a bit and retract filament even more\nG28 X0 ;Y0 ;move X/Y to min endstops\nso the head is out of the way\nG1 Y180 F2000\nM84 ;steppers off\nG90\nM300 P300 S4000"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
},
|
},
|
||||||
"overrides": {
|
"overrides": {
|
||||||
"machine_start_gcode": {
|
"machine_start_gcode": {
|
||||||
"default_value": "; -- START GCODE --\nG21 ;metric values\nG90 ;absolute positioning\nM82 ;set extruder to absolute mode\nM107 ;start with the fan off\nG28 \nG29 Z0.12 ;Auto-bedleveling with Z offset \nG92 E0 ;zero the extruded length \nG1 F2000 E3 ;extrude 3mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F{travel_speed}\nM117 Printing...\n; -- end of START GCODE --"
|
"default_value": "; -- START GCODE --\nG21 ;metric values\nG90 ;absolute positioning\nM82 ;set extruder to absolute mode\nM107 ;start with the fan off\nG28 \nG29 Z0.12 ;Auto-bedleveling with Z offset \nG92 E0 ;zero the extruded length \nG1 F2000 E3 ;extrude 3mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F{speed_travel}\nM117 Printing...\n; -- end of START GCODE --"
|
||||||
},
|
},
|
||||||
"machine_end_gcode": {
|
"machine_end_gcode": {
|
||||||
"default_value": "; -- START GCODE --\nG28 ; Home all axes\nM104 S0 ;extruder heater off\n;M140 S0 ;heated bed heater off (if you have it)\nG91 ;relative positioning\nG1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\n;M84 ;steppers off\nG90 ;absolute positioning\n; -- end of START GCODE --"
|
"default_value": "; -- START GCODE --\nG28 ; Home all axes\nM104 S0 ;extruder heater off\n;M140 S0 ;heated bed heater off (if you have it)\nG91 ;relative positioning\nG1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\n;M84 ;steppers off\nG90 ;absolute positioning\n; -- end of START GCODE --"
|
||||||
|
|
|
@ -213,8 +213,8 @@ UM.ManagementPage
|
||||||
ProfileTab
|
ProfileTab
|
||||||
{
|
{
|
||||||
title: catalog.i18nc("@title:tab", "Global Settings");
|
title: catalog.i18nc("@title:tab", "Global Settings");
|
||||||
quality: base.currentItem != null ? base.currentItem.id : "";
|
quality: Cura.MachineManager.activeMachine.qualityChanges.id
|
||||||
material: Cura.MachineManager.allActiveMaterialIds[Cura.MachineManager.activeMachineId]
|
material: Cura.MachineManager.activeMachine.material.id
|
||||||
}
|
}
|
||||||
|
|
||||||
Repeater
|
Repeater
|
||||||
|
|
|
@ -170,8 +170,8 @@ Item {
|
||||||
|
|
||||||
tooltip: [1, 5].indexOf(base.backendState) != -1 ? catalog.i18nc("@info:tooltip","Slice current printjob") : catalog.i18nc("@info:tooltip","Cancel slicing process")
|
tooltip: [1, 5].indexOf(base.backendState) != -1 ? catalog.i18nc("@info:tooltip","Slice current printjob") : catalog.i18nc("@info:tooltip","Cancel slicing process")
|
||||||
// 1 = not started, 2 = Processing
|
// 1 = not started, 2 = Processing
|
||||||
enabled: base.backendState != "undefined" && (base.backendState == 1 || base.backendState == 2) && base.activity == true
|
enabled: base.backendState != "undefined" && ([1, 2].indexOf(base.backendState) != -1) && base.activity
|
||||||
visible: base.backendState != "undefined" && !autoSlice && (base.backendState == 1 || base.backendState == 2) && base.activity == true
|
visible: base.backendState != "undefined" && !autoSlice && ([1, 2, 4].indexOf(base.backendState) != -1) && base.activity
|
||||||
property bool autoSlice
|
property bool autoSlice
|
||||||
height: UM.Theme.getSize("save_button_save_to_button").height
|
height: UM.Theme.getSize("save_button_save_to_button").height
|
||||||
|
|
||||||
|
@ -179,8 +179,8 @@ Item {
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.rightMargin: UM.Theme.getSize("sidebar_margin").width
|
anchors.rightMargin: UM.Theme.getSize("sidebar_margin").width
|
||||||
|
|
||||||
// 1 = not started, 5 = disabled
|
// 1 = not started, 4 = error, 5 = disabled
|
||||||
text: [1, 5].indexOf(base.backendState) != -1 ? catalog.i18nc("@label:Printjob", "Prepare") : catalog.i18nc("@label:Printjob", "Cancel")
|
text: [1, 4, 5].indexOf(base.backendState) != -1 ? catalog.i18nc("@label:Printjob", "Prepare") : catalog.i18nc("@label:Printjob", "Cancel")
|
||||||
onClicked:
|
onClicked:
|
||||||
{
|
{
|
||||||
sliceOrStopSlicing();
|
sliceOrStopSlicing();
|
||||||
|
|
|
@ -63,11 +63,9 @@ Item
|
||||||
menu: ProfileMenu { }
|
menu: ProfileMenu { }
|
||||||
|
|
||||||
function generateActiveQualityText () {
|
function generateActiveQualityText () {
|
||||||
var result = catalog.i18nc("@", "No Profile Available") // default text
|
var result = Cura.MachineManager.activeQualityName;
|
||||||
|
|
||||||
if (Cura.MachineManager.isActiveQualitySupported ) {
|
|
||||||
result = Cura.MachineManager.activeQualityName
|
|
||||||
|
|
||||||
|
if (Cura.MachineManager.isActiveQualitySupported) {
|
||||||
if (Cura.MachineManager.activeQualityLayerHeight > 0) {
|
if (Cura.MachineManager.activeQualityLayerHeight > 0) {
|
||||||
result += " <font color=\"" + UM.Theme.getColor("text_detail") + "\">"
|
result += " <font color=\"" + UM.Theme.getColor("text_detail") + "\">"
|
||||||
result += " - "
|
result += " - "
|
||||||
|
|
|
@ -864,9 +864,10 @@ QtObject {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
label: Label {
|
label: Label {
|
||||||
text: control.text;
|
text: control.text
|
||||||
color: Theme.getColor("checkbox_text");
|
color: Theme.getColor("checkbox_text")
|
||||||
font: Theme.getFont("default");
|
font: Theme.getFont("default")
|
||||||
|
elide: Text.ElideRight
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue