mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-02 20:52:20 -07:00
Merge pull request #6594 from fieldOfView/fix_jobname_editing
Make jobname less sensitive to being touched
This commit is contained in:
commit
8b9e5c5154
1 changed files with 14 additions and 2 deletions
|
|
@ -83,10 +83,22 @@ Item
|
|||
text: PrintInformation.jobName
|
||||
horizontalAlignment: TextInput.AlignLeft
|
||||
|
||||
property string textBeforeEdit: ""
|
||||
|
||||
onActiveFocusChanged:
|
||||
{
|
||||
if (activeFocus)
|
||||
{
|
||||
textBeforeEdit = text
|
||||
}
|
||||
}
|
||||
|
||||
onEditingFinished:
|
||||
{
|
||||
if (text != textBeforeEdit) {
|
||||
var new_name = text == "" ? catalog.i18nc("@text Print job name", "Untitled") : text
|
||||
PrintInformation.setJobName(new_name, true)
|
||||
}
|
||||
printJobTextfield.focus = false
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue