mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 06:58:59 +08:00
Merge pull request #4743 from Ultimaker/CURA-5896_strip_exra_curaproject_extensions
[3.6] [CURA-5896] Try to strip extra curaproject extensions
This commit is contained in:
commit
c262635144
@ -371,9 +371,14 @@ class PrintInformation(QObject):
|
|||||||
|
|
||||||
# Strip the old "curaproject" extension from the name
|
# Strip the old "curaproject" extension from the name
|
||||||
OLD_CURA_PROJECT_EXT = ".curaproject"
|
OLD_CURA_PROJECT_EXT = ".curaproject"
|
||||||
if self._base_name.endswith(OLD_CURA_PROJECT_EXT):
|
if self._base_name.lower().endswith(OLD_CURA_PROJECT_EXT):
|
||||||
self._base_name = self._base_name[:len(self._base_name) - len(OLD_CURA_PROJECT_EXT)]
|
self._base_name = self._base_name[:len(self._base_name) - len(OLD_CURA_PROJECT_EXT)]
|
||||||
|
|
||||||
|
# CURA-5896 Try to strip extra extensions with an infinite amount of ".curaproject.3mf".
|
||||||
|
OLD_CURA_PROJECT_3MF_EXT = ".curaproject.3mf"
|
||||||
|
while self._base_name.lower().endswith(OLD_CURA_PROJECT_3MF_EXT):
|
||||||
|
self._base_name = self._base_name[:len(self._base_name) - len(OLD_CURA_PROJECT_3MF_EXT)]
|
||||||
|
|
||||||
self._updateJobName()
|
self._updateJobName()
|
||||||
|
|
||||||
@pyqtProperty(str, fset = setBaseName, notify = baseNameChanged)
|
@pyqtProperty(str, fset = setBaseName, notify = baseNameChanged)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user