Merge branch '2.1' of https://github.com/Ultimaker/Cura into 2.1

This commit is contained in:
Tim Kuipers 2016-03-03 11:58:47 +01:00
commit 7c8e08401b
8 changed files with 25 additions and 19 deletions

View File

@ -274,8 +274,8 @@ class CuraEngineBackend(Backend):
# There is data and we're not slicing at the moment # There is data and we're not slicing at the moment
# if we are slicing, there is no need to re-calculate the data as it will be invalid in a moment. # if we are slicing, there is no need to re-calculate the data as it will be invalid in a moment.
if self._stored_layer_data and not self._slicing: if self._stored_layer_data and not self._slicing:
job = ProcessSlicedObjectListJob.ProcessSlicedObjectListJob(self._stored_layer_data) self._process_layers_job = ProcessSlicedObjectListJob.ProcessSlicedObjectListJob(self._stored_layer_data)
job.start() self._process_layers_job.start()
self._stored_layer_data = None self._stored_layer_data = None
else: else:
self._layer_view_active = False self._layer_view_active = False

View File

@ -95,6 +95,8 @@ class ProcessSlicedObjectListJob(Job):
points = points.reshape((-1,2)) # We get a linear list of pairs that make up the points, so make numpy interpret them correctly. points = points.reshape((-1,2)) # We get a linear list of pairs that make up the points, so make numpy interpret them correctly.
# Create a new 3D-array, copy the 2D points over and insert the right height. # Create a new 3D-array, copy the 2D points over and insert the right height.
# This uses manual array creation + copy rather than numpy.insert since this is
# faster.
new_points = numpy.empty((len(points), 3), numpy.float32) new_points = numpy.empty((len(points), 3), numpy.float32)
new_points[:,0] = points[:,0] new_points[:,0] = points[:,0]
new_points[:,1] = layer.height new_points[:,1] = layer.height

View File

@ -6,6 +6,7 @@ from UM.Logger import Logger
from UM.Application import Application from UM.Application import Application
import io import io
import re #For escaping characters in the settings. import re #For escaping characters in the settings.
import copy
class GCodeWriter(MeshWriter): class GCodeWriter(MeshWriter):
@ -57,7 +58,8 @@ class GCodeWriter(MeshWriter):
prefix = ";SETTING_" + str(GCodeWriter.version) + " " #The prefix to put before each line. prefix = ";SETTING_" + str(GCodeWriter.version) + " " #The prefix to put before each line.
prefix_length = len(prefix) prefix_length = len(prefix)
serialised = profile.serialise() #Serialise a deepcopy to remove the defaults from the profile
serialised = copy.deepcopy(profile).serialise()
#Escape characters that have a special meaning in g-code comments. #Escape characters that have a special meaning in g-code comments.
pattern = re.compile("|".join(GCodeWriter.escape_characters.keys())) pattern = re.compile("|".join(GCodeWriter.escape_characters.keys()))

View File

@ -225,8 +225,8 @@ class _CreateTopLayersJob(Job):
layer_data = None layer_data = None
for node in DepthFirstIterator(self._scene.getRoot()): for node in DepthFirstIterator(self._scene.getRoot()):
layer_data = node.callDecoration("getLayerData") layer_data = node.callDecoration("getLayerData")
if not layer_data: if layer_data:
continue break
if self._cancel or not layer_data: if self._cancel or not layer_data:
return return

View File

@ -34,11 +34,11 @@ Item
Rectangle Rectangle
{ {
x: parent.width + UM.Theme.getSize("default_margin").width; x: parent.width + UM.Theme.getSize("slider_layerview_background").width / 2;
y: parent.height - (parent.value * parent.pixelsPerStep) - UM.Theme.getSize("slider_handle").height * 1.25; y: parent.height - (parent.value * parent.pixelsPerStep) - UM.Theme.getSize("slider_handle").height * 1.25;
height: UM.Theme.getSize("slider_handle").height + UM.Theme.getSize("default_margin").height height: UM.Theme.getSize("slider_handle").height + UM.Theme.getSize("default_margin").height
width: valueLabel.width + (busyIndicator.visible ? busyIndicator.width : 0) + UM.Theme.getSize("default_margin").width width: valueLabel.width + UM.Theme.getSize("default_margin").width
Behavior on height { NumberAnimation { duration: 50; } } Behavior on height { NumberAnimation { duration: 50; } }
border.width: UM.Theme.getSize("default_lining").width; border.width: UM.Theme.getSize("default_lining").width;
@ -78,8 +78,8 @@ Item
BusyIndicator BusyIndicator
{ {
id: busyIndicator; id: busyIndicator;
anchors.right: parent.right; anchors.left: parent.right;
anchors.rightMargin: UM.Theme.getSize("default_margin").width / 2; anchors.leftMargin: UM.Theme.getSize("default_margin").width / 2;
anchors.verticalCenter: parent.verticalCenter; anchors.verticalCenter: parent.verticalCenter;
width: UM.Theme.getSize("slider_handle").height; width: UM.Theme.getSize("slider_handle").height;

View File

@ -25,7 +25,6 @@ Rectangle {
property variant printDuration: PrintInformation.currentPrintTime; property variant printDuration: PrintInformation.currentPrintTime;
property real printMaterialAmount: PrintInformation.materialAmount; property real printMaterialAmount: PrintInformation.materialAmount;
width: UM.Theme.getSize("jobspecs").width
height: childrenRect.height height: childrenRect.height
color: "transparent" color: "transparent"
@ -125,13 +124,14 @@ Rectangle {
anchors.right: printJobPencilIcon.left anchors.right: printJobPencilIcon.left
anchors.rightMargin: UM.Theme.getSize("default_margin").width/2 anchors.rightMargin: UM.Theme.getSize("default_margin").width/2
height: UM.Theme.getSize("jobspecs_line").height height: UM.Theme.getSize("jobspecs_line").height
width: base.width width: __contentWidth + UM.Theme.getSize("default_margin").width
maximumLength: 120
property int unremovableSpacing: 5 property int unremovableSpacing: 5
text: '' text: ''
horizontalAlignment: TextInput.AlignRight horizontalAlignment: TextInput.AlignRight
onTextChanged: { onTextChanged: {
if(text != ''){ if(text != ''){
//this prevent that is sets an empty string as jobname //Prevent that jobname is set to an empty string
Printer.setJobName(text) Printer.setJobName(text)
} }
} }

View File

@ -212,6 +212,7 @@ Item
id: machineName; id: machineName;
text: getMachineName() text: getMachineName()
implicitWidth: UM.Theme.getSize("standard_list_input").width implicitWidth: UM.Theme.getSize("standard_list_input").width
maximumLength: 120
} }
} }

View File

@ -368,6 +368,7 @@ QtObject {
width: Theme.getSize("slider_handle").width; width: Theme.getSize("slider_handle").width;
height: Theme.getSize("slider_handle").height; height: Theme.getSize("slider_handle").height;
color: control.hovered ? Theme.getColor("slider_handle_hover") : Theme.getColor("slider_handle"); color: control.hovered ? Theme.getColor("slider_handle_hover") : Theme.getColor("slider_handle");
radius: Theme.getSize("slider_handle").width/2;
Behavior on color { ColorAnimation { duration: 50; } } Behavior on color { ColorAnimation { duration: 50; } }
} }
} }