Fix merge conflicts

This commit is contained in:
Lipu Fei 2019-03-28 14:46:19 +01:00
commit e010220432
21 changed files with 52 additions and 37 deletions

View file

@ -442,7 +442,8 @@ class QualityManager(QObject):
quality_changes_group = quality_model_item["quality_changes_group"]
if quality_changes_group is None:
# create global quality changes only
new_quality_changes = self._createQualityChanges(quality_group.quality_type, quality_changes_name,
new_name = self._container_registry.uniqueName(quality_changes_name)
new_quality_changes = self._createQualityChanges(quality_group.quality_type, new_name,
global_stack, None)
self._container_registry.addContainer(new_quality_changes)
else:

View file

@ -29,4 +29,4 @@ class PlatformPhysicsOperation(Operation):
return group
def __repr__(self):
return "PlatformPhysicsOperation(translation = {0})".format(self._translation)
return "PlatformPhysicsOp.(trans.={0})".format(self._translation)

View file

@ -112,21 +112,21 @@ class CuraSceneNode(SceneNode):
## Override of SceneNode._calculateAABB to exclude non-printing-meshes from bounding box
def _calculateAABB(self) -> None:
self._aabb = None
if self._mesh_data:
aabb = self._mesh_data.getExtents(self.getWorldTransformation())
else: # If there is no mesh_data, use a boundingbox that encompasses the local (0,0,0)
position = self.getWorldPosition()
aabb = AxisAlignedBox(minimum = position, maximum = position)
self._aabb = self._mesh_data.getExtents(self.getWorldTransformation())
for child in self._children:
if child.callDecoration("isNonPrintingMesh"):
# Non-printing-meshes inside a group should not affect push apart or drop to build plate
continue
if aabb is None:
aabb = child.getBoundingBox()
if not child._mesh_data:
# Nodes without mesh data should not affect bounding boxes of their parents.
continue
if self._aabb is None:
self._aabb = child.getBoundingBox()
else:
aabb = aabb + child.getBoundingBox()
self._aabb = aabb
self._aabb = self._aabb + child.getBoundingBox()
## Taken from SceneNode, but replaced SceneNode with CuraSceneNode
def __deepcopy__(self, memo: Dict[int, object]) -> "CuraSceneNode":

View file

@ -23,7 +23,10 @@ known_args = vars(parser.parse_known_args()[0])
if not known_args["debug"]:
def get_cura_dir_path():
if Platform.isWindows():
return os.path.expanduser("~/AppData/Roaming/" + CuraAppName)
appdata_path = os.getenv("APPDATA")
if not appdata_path: #Defensive against the environment variable missing (should never happen).
appdata_path = "."
return os.path.join(appdata_path, CuraAppName)
elif Platform.isLinux():
return os.path.expanduser("~/.local/share/" + CuraAppName)
elif Platform.isOSX():

View file

@ -123,7 +123,7 @@ UM.Dialog
UM.TooltipArea {
Layout.fillWidth:true
height: childrenRect.height
text: catalog.i18nc("@info:tooltip","By default, white pixels represent high points on the mesh and black pixels represent low points on the mesh. Change this option to reverse the behavior such that black pixels represent high points on the mesh and white pixels represent low points on the mesh.")
text: catalog.i18nc("@info:tooltip","For lithophanes dark pixels should correspond to thicker locations in order to block more light coming through. For height maps lighter pixels signify higher terrain, so lighter pixels should correspond to thicker locations in the generated 3D model.")
Row {
width: parent.width
@ -134,9 +134,9 @@ UM.Dialog
anchors.verticalCenter: parent.verticalCenter
}
ComboBox {
id: image_color_invert
objectName: "Image_Color_Invert"
model: [ catalog.i18nc("@item:inlistbox","Lighter is higher"), catalog.i18nc("@item:inlistbox","Darker is higher") ]
id: lighter_is_higher
objectName: "Lighter_Is_Higher"
model: [ catalog.i18nc("@item:inlistbox","Darker is higher"), catalog.i18nc("@item:inlistbox","Lighter is higher") ]
width: 180 * screenScaleFactor
onCurrentIndexChanged: { manager.onImageColorInvertChanged(currentIndex) }
}

View file

@ -46,9 +46,9 @@ class ImageReader(MeshReader):
def _read(self, file_name):
size = max(self._ui.getWidth(), self._ui.getDepth())
return self._generateSceneNode(file_name, size, self._ui.peak_height, self._ui.base_height, self._ui.smoothing, 512, self._ui.image_color_invert)
return self._generateSceneNode(file_name, size, self._ui.peak_height, self._ui.base_height, self._ui.smoothing, 512, self._ui.lighter_is_higher)
def _generateSceneNode(self, file_name, xz_size, peak_height, base_height, blur_iterations, max_size, image_color_invert):
def _generateSceneNode(self, file_name, xz_size, peak_height, base_height, blur_iterations, max_size, lighter_is_higher):
scene_node = SceneNode()
mesh = MeshBuilder()
@ -104,7 +104,7 @@ class ImageReader(MeshReader):
Job.yieldThread()
if image_color_invert:
if not lighter_is_higher:
height_data = 1 - height_data
for _ in range(0, blur_iterations):

View file

@ -30,10 +30,10 @@ class ImageReaderUI(QObject):
self._width = self.default_width
self._depth = self.default_depth
self.base_height = 1
self.peak_height = 10
self.base_height = 0.4
self.peak_height = 2.5
self.smoothing = 1
self.image_color_invert = False;
self.lighter_is_higher = False;
self._ui_lock = threading.Lock()
self._cancelled = False
@ -143,4 +143,4 @@ class ImageReaderUI(QObject):
@pyqtSlot(int)
def onImageColorInvertChanged(self, value):
self.image_color_invert = (value == 1)
self.lighter_is_higher = (value == 1)

View file

@ -76,7 +76,7 @@ Item
height: (parent.height * 0.4) | 0
anchors
{
bottom: parent.bottomcommi
bottom: parent.bottom
right: parent.right
}
sourceSize.height: height

View file

@ -11,8 +11,8 @@ I18N_CATALOG = i18nCatalog("cura")
class CloudProgressMessage(Message):
def __init__(self):
super().__init__(
text = I18N_CATALOG.i18nc("@info:status", "Sending data to remote cluster"),
title = I18N_CATALOG.i18nc("@info:status", "Sending data to remote cluster"),
title = I18N_CATALOG.i18nc("@info:status", "Sending Print Job"),
text = I18N_CATALOG.i18nc("@info:status", "Uploading via Ultimaker Cloud"),
progress = -1,
lifetime = 0,
dismissable = False,

View file

@ -6677,6 +6677,7 @@
"default_value": 0.01,
"unit": "mm",
"settable_per_mesh": false,
"minimum_value": "0.0001",
"settable_per_extruder": false,
"settable_per_meshgroup": false
},

View file

@ -14,7 +14,6 @@
"has_materials": false,
"has_machine_quality": true,
"preferred_variant_name": "0.4 mm",
"exclude_materials": ["generic_hips", "generic_petg", "generic_bam", "ultimaker_bam", "generic_pva", "ultimaker_pva", "generic_tough_pla", "ultimaker_tough_pla_black", "ultimaker_tough_pla_green", "ultimaker_tough_pla_red", "ultimaker_tough_pla_white"],
"first_start_actions": ["UM2UpgradeSelection"],
"supported_actions":["UM2UpgradeSelection"],
"machine_extruder_trains":

View file

@ -14,6 +14,7 @@
"has_materials": true,
"has_machine_materials": true,
"has_machine_quality": true,
"exclude_materials": ["generic_hips", "generic_petg", "generic_bam", "ultimaker_bam", "generic_pva", "ultimaker_pva", "generic_tough_pla", "ultimaker_tough_pla_black", "ultimaker_tough_pla_green", "ultimaker_tough_pla_red", "ultimaker_tough_pla_white", "generic_cffcpe", "generic_cffpa", "generic_gffcpe", "generic_gffpa", "structur3d_dap100silicone" ],
"first_start_actions": [],
"supported_actions": [],
"machine_extruder_trains":

View file

@ -14,6 +14,7 @@
"has_materials": true,
"has_machine_materials": true,
"has_variants": true,
"exclude_materials": [ "generic_cffcpe", "generic_cffpa", "generic_gffcpe", "generic_gffpa", "structur3d_dap100silicone" ],
"preferred_variant_name": "AA 0.4",
"preferred_quality_type": "normal",
"variants_name": "Print core",
@ -29,8 +30,7 @@
"id": 9066,
"check_urls":
[
"http://software.ultimaker.com/jedi/releases/latest.version?utm_source=cura&utm_medium=software&utm_campaign=resources",
"http://software.ultimaker.com/releases/firmware/9066/stable/version.txt"
"http://software.ultimaker.com/releases/firmware/9066/stable/um-update.swu.version"
],
"update_url": "https://ultimaker.com/firmware"
}

View file

@ -28,8 +28,7 @@
"id": 9511,
"check_urls":
[
"http://software.ultimaker.com/jedi/releases/latest.version?utm_source=cura&utm_medium=software&utm_campaign=resources",
"http://software.ultimaker.com/releases/firmware/9511/stable/version.txt"
"http://software.ultimaker.com/releases/firmware/9066/stable/um-update.swu.version"
],
"update_url": "https://ultimaker.com/firmware"
}

View file

@ -11,7 +11,7 @@
"platform": "ultimaker_platform.stl",
"has_materials": true,
"has_machine_quality": true,
"exclude_materials": ["generic_hips", "generic_petg", "generic_bam", "ultimaker_bam", "generic_pva", "ultimaker_pva", "generic_tough_pla", "ultimaker_tough_pla_black", "ultimaker_tough_pla_green", "ultimaker_tough_pla_red", "ultimaker_tough_pla_white"],
"exclude_materials": ["generic_hips", "generic_petg", "generic_bam", "ultimaker_bam", "generic_pva", "ultimaker_pva", "generic_tough_pla", "ultimaker_tough_pla_black", "ultimaker_tough_pla_green", "ultimaker_tough_pla_red", "ultimaker_tough_pla_white", "generic_cffcpe", "generic_cffpa", "generic_gffcpe", "generic_gffpa", "structur3d_dap100silicone" ],
"first_start_actions": ["UMOUpgradeSelection", "BedLevel"],
"supported_actions": ["UMOUpgradeSelection", "BedLevel"],
"machine_extruder_trains":

View file

@ -12,7 +12,7 @@
"has_materials": true,
"has_machine_quality": true,
"quality_definition": "ultimaker_original",
"exclude_materials": ["generic_hips", "generic_petg", "generic_bam", "ultimaker_bam", "generic_pva", "ultimaker_pva", "generic_tough_pla", "ultimaker_tough_pla_black", "ultimaker_tough_pla_green", "ultimaker_tough_pla_red", "ultimaker_tough_pla_white"],
"exclude_materials": ["generic_hips", "generic_petg", "generic_bam", "ultimaker_bam", "generic_pva", "ultimaker_pva", "generic_tough_pla", "ultimaker_tough_pla_black", "ultimaker_tough_pla_green", "ultimaker_tough_pla_red", "ultimaker_tough_pla_white", "generic_cffcpe", "generic_cffpa", "generic_gffcpe", "generic_gffpa", "structur3d_dap100silicone" ],
"machine_extruder_trains":
{
"0": "ultimaker_original_dual_1st",

View file

@ -33,7 +33,7 @@
"weight": -1,
"firmware_update_info": {
"id": 9051,
"check_urls": ["http://software.ultimaker.com/releases/firmware/9051/stable/version.txt"],
"check_urls": ["http://software.ultimaker.com/releases/firmware/9051/stable/um-update.swu.version"],
"update_url": "https://ultimaker.com/firmware"
}
},

View file

@ -40,6 +40,10 @@ Button
// we elide the text to the right so the text will be cut off with the three dots at the end.
property var fixedWidthMode: false
// This property is used when the space for the button is limited. In case the button needs to grow with the text,
// but it can exceed a maximum, then this value have to be set.
property int maximumWidth: 0
leftPadding: UM.Theme.getSize("default_margin").width
rightPadding: UM.Theme.getSize("default_margin").width
height: UM.Theme.getSize("action_button").height
@ -73,7 +77,7 @@ Button
renderType: Text.NativeRendering
height: parent.height
anchors.verticalCenter: parent.verticalCenter
width: fixedWidthMode ? button.width - button.leftPadding - button.rightPadding : undefined
width: fixedWidthMode ? button.width - button.leftPadding - button.rightPadding : ((maximumWidth != 0 && contentWidth > maximumWidth) ? maximumWidth : undefined)
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
elide: Text.ElideRight

View file

@ -154,7 +154,7 @@ UM.PreferencesPage
append({ text: "日本語", code: "ja_JP" })
append({ text: "한국어", code: "ko_KR" })
append({ text: "Nederlands", code: "nl_NL" })
//Polish is disabled for being incomplete: append({ text: "Polski", code: "pl_PL" })
append({ text: "Polski", code: "pl_PL" })
append({ text: "Português do Brasil", code: "pt_BR" })
append({ text: "Português", code: "pt_PT" })
append({ text: "Русский", code: "ru_RU" })

View file

@ -16,7 +16,7 @@ Cura.ExpandableComponent
contentPadding: UM.Theme.getSize("default_lining").width
contentHeaderTitle: catalog.i18nc("@label", "Print settings")
enabled: !preSlicedData
disabledText: catalog.i18nc("@label shown when we load a Gcode file", "Print setup disabled. G code file can not be modified.")
disabledText: catalog.i18nc("@label shown when we load a Gcode file", "Print setup disabled. G-code file can not be modified.")
UM.I18nCatalog
{

View file

@ -114,6 +114,7 @@ Cura.ExpandablePopup
MachineSelectorList
{
id: machineSelectorList
// Can't use parent.width since the parent is the flickable component and not the ScrollView
width: scroll.width - scroll.leftPadding - scroll.rightPadding
property real maximumHeight: UM.Theme.getSize("machine_selector_widget_content").height - buttonRow.height
@ -159,6 +160,9 @@ Cura.ExpandablePopup
leftPadding: UM.Theme.getSize("default_margin").width
rightPadding: UM.Theme.getSize("default_margin").width
text: catalog.i18nc("@button", "Add printer")
// The maximum width of the button is half of the total space, minus the padding of the parent, the left
// padding of the component and half the spacing because of the space between buttons.
maximumWidth: UM.Theme.getSize("machine_selector_widget_content").width / 2 - parent.padding - leftPadding - parent.spacing / 2
onClicked:
{
toggleContent()
@ -171,6 +175,9 @@ Cura.ExpandablePopup
leftPadding: UM.Theme.getSize("default_margin").width
rightPadding: UM.Theme.getSize("default_margin").width
text: catalog.i18nc("@button", "Manage printers")
// The maximum width of the button is half of the total space, minus the padding of the parent, the right
// padding of the component and half the spacing because of the space between buttons.
maximumWidth: UM.Theme.getSize("machine_selector_widget_content").width / 2 - parent.padding - rightPadding - parent.spacing / 2
onClicked:
{
toggleContent()