mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-02 20:52:20 -07:00
CreateJob name no longer adds the same abbreviation multiple times
Contributes to CURA-3387
This commit is contained in:
parent
057dc2fd7d
commit
033c08d3ff
1 changed files with 3 additions and 0 deletions
|
|
@ -205,6 +205,9 @@ class PrintInformation(QObject):
|
||||||
if self._pre_sliced:
|
if self._pre_sliced:
|
||||||
return catalog.i18nc("@label", "Pre-sliced file {0}", base_name)
|
return catalog.i18nc("@label", "Pre-sliced file {0}", base_name)
|
||||||
elif Preferences.getInstance().getValue("cura/jobname_prefix"):
|
elif Preferences.getInstance().getValue("cura/jobname_prefix"):
|
||||||
|
# Don't add abbreviation if it already has the exact same abbreviation.
|
||||||
|
if base_name.startswith(self._abbr_machine + "_"):
|
||||||
|
return base_name
|
||||||
return self._abbr_machine + "_" + base_name
|
return self._abbr_machine + "_" + base_name
|
||||||
else:
|
else:
|
||||||
return base_name
|
return base_name
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue