mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-02 20:52:20 -07:00
Added materialspage Display Name field and made it work. CURA-1969
This commit is contained in:
parent
8df5bba6e9
commit
2ae998737f
4 changed files with 60 additions and 2 deletions
|
|
@ -44,6 +44,16 @@ TabView
|
|||
|
||||
property real rowHeight: textField.height;
|
||||
|
||||
Label { width: base.firstColumnWidth; height: parent.rowHeight; verticalAlignment: Qt.AlignVCenter; text: catalog.i18nc("@label", "Display Name") }
|
||||
ReadOnlyTextField
|
||||
{
|
||||
id: displayNameTextField;
|
||||
width: base.secondColumnWidth;
|
||||
text: properties.name;
|
||||
readOnly: !base.editingEnabled;
|
||||
onEditingFinished: base.setName(properties.name, text)
|
||||
}
|
||||
|
||||
Label { width: base.firstColumnWidth; height: parent.rowHeight; verticalAlignment: Qt.AlignVCenter; text: catalog.i18nc("@label", "Brand") }
|
||||
ReadOnlyTextField
|
||||
{
|
||||
|
|
@ -254,7 +264,15 @@ TabView
|
|||
{
|
||||
if(old_value != new_value)
|
||||
{
|
||||
Cura.ContainerManager.setContainerMetaDataEntry(base.containerId, entry_name, new_value)
|
||||
Cura.ContainerManager.setContainerMetaDataEntry(base.containerId, entry_name, new_value);
|
||||
}
|
||||
}
|
||||
|
||||
function setName(old_value, new_value)
|
||||
{
|
||||
if(old_value != new_value)
|
||||
{
|
||||
Cura.ContainerManager.setContainerName(base.containerId, new_value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue