diff options
author | Lipu Fei <lipu.fei815@gmail.com> | 2017-10-26 12:13:28 +0300 |
---|---|---|
committer | Lipu Fei <lipu.fei815@gmail.com> | 2017-10-26 12:13:30 +0300 |
commit | 701e9a91c23f30f51d4fb4a9830d76677de1b48a (patch) | |
tree | 5cb4acafb72731961752ce71727eb82226a4345e /cura/PrintInformation.py | |
parent | e4fec1f63d0406221422bc191d6043db1d16fb68 (diff) |
Allow using longer accent for machines in job names
Diffstat (limited to 'cura/PrintInformation.py')
-rw-r--r-- | cura/PrintInformation.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/cura/PrintInformation.py b/cura/PrintInformation.py index 86bcc2719e..f3b178c356 100644 --- a/cura/PrintInformation.py +++ b/cura/PrintInformation.py @@ -313,7 +313,12 @@ class PrintInformation(QObject): elif word.isdigit(): abbr_machine += word else: - abbr_machine += self._stripAccents(word.strip("()[]{}#").upper())[0] + stripped_word = self._stripAccents(word.strip("()[]{}#").upper()) + # - use only the first character if the word is too long (> 3 characters) + # - use the whole word if it's not too long (<= 3 characters) + if len(stripped_word) > 3: + stripped_word = stripped_word[0] + abbr_machine += stripped_word self._abbr_machine = abbr_machine @@ -339,4 +344,3 @@ class PrintInformation(QObject): temp_material_amounts = [0] self._onPrintDurationMessage(temp_message, temp_material_amounts) - |