mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-22 12:39:22 +08:00
CreateJob name no longer adds the same abbreviation multiple times
Contributes to CURA-3387
This commit is contained in:
parent
057dc2fd7d
commit
033c08d3ff
@ -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…
x
Reference in New Issue
Block a user