mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 02:35:53 +08:00
Make sure that file extensions are always lowered
CURA-5367
This commit is contained in:
parent
3fefdad14b
commit
30cbdfed69
@ -1572,10 +1572,11 @@ class CuraApplication(QtApplication):
|
|||||||
|
|
||||||
f = file.toLocalFile()
|
f = file.toLocalFile()
|
||||||
extension = os.path.splitext(f)[1]
|
extension = os.path.splitext(f)[1]
|
||||||
|
extension = extension.lower()
|
||||||
filename = os.path.basename(f)
|
filename = os.path.basename(f)
|
||||||
if len(self._currently_loading_files) > 0:
|
if len(self._currently_loading_files) > 0:
|
||||||
# If a non-slicable file is already being loaded, we prevent loading of any further non-slicable files
|
# If a non-slicable file is already being loaded, we prevent loading of any further non-slicable files
|
||||||
if extension.lower() in self._non_sliceable_extensions:
|
if extension in self._non_sliceable_extensions:
|
||||||
message = Message(
|
message = Message(
|
||||||
self._i18n_catalog.i18nc("@info:status",
|
self._i18n_catalog.i18nc("@info:status",
|
||||||
"Only one G-code file can be loaded at a time. Skipped importing {0}",
|
"Only one G-code file can be loaded at a time. Skipped importing {0}",
|
||||||
@ -1584,7 +1585,8 @@ class CuraApplication(QtApplication):
|
|||||||
return
|
return
|
||||||
# If file being loaded is non-slicable file, then prevent loading of any other files
|
# If file being loaded is non-slicable file, then prevent loading of any other files
|
||||||
extension = os.path.splitext(self._currently_loading_files[0])[1]
|
extension = os.path.splitext(self._currently_loading_files[0])[1]
|
||||||
if extension.lower() in self._non_sliceable_extensions:
|
extension = extension.lower()
|
||||||
|
if extension in self._non_sliceable_extensions:
|
||||||
message = Message(
|
message = Message(
|
||||||
self._i18n_catalog.i18nc("@info:status",
|
self._i18n_catalog.i18nc("@info:status",
|
||||||
"Can't open any other file if G-code is loading. Skipped importing {0}",
|
"Can't open any other file if G-code is loading. Skipped importing {0}",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user