mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-07 22:13:58 -06:00
Merge branch 'master' of github.com:Ultimaker/Cura
This commit is contained in:
commit
2cf181080a
7 changed files with 71 additions and 25 deletions
|
@ -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
|
||||
{
|
||||
regExp: {
|
||||
machineName.machine_name_validator.machineNameRegex
|
||||
}
|
||||
}
|
||||
property var machine_name_validator: Cura.MachineNameValidator { }
|
||||
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
|
||||
{
|
||||
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 { }
|
||||
}
|
||||
}
|
||||
|
||||
Button
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue