Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack Ha <j.ha@ultimaker.com>2016-12-14 18:53:22 +0300
committerJack Ha <j.ha@ultimaker.com>2016-12-14 18:53:22 +0300
commit2cf181080ae3334a30e8378aaae340e0fc04d2f6 (patch)
tree95322872d8c117da9633de94c1c6501f80bf4ab3 /resources
parenta9a9390aa6bffec9f2691d3549541422060b7153 (diff)
parent2fe0bab52d2b0eabc2d321e5e3ee561f6fe691cb (diff)
Merge branch 'master' of github.com:Ultimaker/Cura
Diffstat (limited to 'resources')
-rw-r--r--resources/definitions/fdmprinter.def.json2
-rw-r--r--resources/qml/AddMachineDialog.qml42
2 files changed, 29 insertions, 15 deletions
diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json
index 8dec4a307e..7725940553 100644
--- a/resources/definitions/fdmprinter.def.json
+++ b/resources/definitions/fdmprinter.def.json
@@ -1190,7 +1190,7 @@
"type": "int",
"minimum_value": "0",
"maximum_value_warning": "4",
- "maximum_value": "20 - math.log(infill_line_distance) / math.log(2)",
+ "maximum_value": "(20 - math.log(infill_line_distance) / math.log(2)) if infill_line_distance > 0 else 0",
"enabled": "infill_sparse_density > 0 and infill_pattern != 'cubicsubdiv'",
"settable_per_mesh": true
},
diff --git a/resources/qml/AddMachineDialog.qml b/resources/qml/AddMachineDialog.qml
index 80ac1213a8..8506074b0d 100644
--- a/resources/qml/AddMachineDialog.qml
+++ b/resources/qml/AddMachineDialog.qml
@@ -46,7 +46,8 @@ UM.Dialog
left: parent.left;
top: parent.top;
right: parent.right;
- bottom: parent.bottom;
+ bottom: machineNameRow.top;
+ bottomMargin: UM.Theme.getSize("default_margin").height
}
ListView
@@ -65,6 +66,7 @@ UM.Dialog
section.delegate: Button
{
text: section
+ width: machineList.width
style: ButtonStyle
{
background: Rectangle
@@ -102,8 +104,8 @@ UM.Dialog
base.activeCategory = section;
if (machineList.model.getItem(machineList.currentIndex).section != section) {
// Find the first machine from this section
- for(var i = 0; i < sortedMachineDefinitionsModel.count; i++) {
- var item = sortedMachineDefinitionsModel.getItem(i);
+ for(var i = 0; i < machineList.model.rowCount(); i++) {
+ var item = machineList.model.getItem(i);
if (item.section == section) {
machineList.currentIndex = i;
break;
@@ -169,21 +171,33 @@ UM.Dialog
}
}
- TextField
+ Row
{
- id: machineName;
- text: getMachineName()
- implicitWidth: UM.Theme.getSize("standard_list_input").width
- maximumLength: 40
- //validator: Cura.MachineNameValidator { } //TODO: Gives a segfault in PyQt5.6. For now, we must use a signal on text changed.
- validator: RegExpValidator
+ id: machineNameRow
+ anchors.bottom:parent.bottom
+ spacing: UM.Theme.getSize("default_margin").width
+
+ Label
+ {
+ text: catalog.i18nc("@label", "Printer Name:")
+ anchors.verticalCenter: machineName.verticalCenter
+ }
+
+ TextField
{
- regExp: {
- machineName.machine_name_validator.machineNameRegex
+ id: machineName
+ text: getMachineName()
+ implicitWidth: UM.Theme.getSize("standard_list_input").width
+ maximumLength: 40
+ //validator: Cura.MachineNameValidator { } //TODO: Gives a segfault in PyQt5.6. For now, we must use a signal on text changed.
+ validator: RegExpValidator
+ {
+ regExp: {
+ machineName.machine_name_validator.machineNameRegex
+ }
}
+ property var machine_name_validator: Cura.MachineNameValidator { }
}
- property var machine_name_validator: Cura.MachineNameValidator { }
- anchors.bottom:parent.bottom
}
Button