diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 56f1528b9b..292d0bce94 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -1625,8 +1625,13 @@ class CuraApplication(QtApplication): node.setName(os.path.basename(filename)) self.getBuildVolume().checkBoundsAndUpdate(node) - extension = os.path.splitext(filename)[1] - if extension.lower() in self._non_sliceable_extensions: + is_non_sliceable = False + filename_lower = filename.lower() + for extension in self._non_sliceable_extensions: + if filename_lower.endswith(extension): + is_non_sliceable = True + break + if is_non_sliceable: self.callLater(lambda: self.getController().setActiveView("SimulationView")) block_slicing_decorator = BlockSlicingDecorator() diff --git a/plugins/GCodeGzReader/GCodeGzReader.py b/plugins/GCodeGzReader/GCodeGzReader.py index df1b8439cd..52df7f074f 100644 --- a/plugins/GCodeGzReader/GCodeGzReader.py +++ b/plugins/GCodeGzReader/GCodeGzReader.py @@ -19,7 +19,7 @@ class GCodeGzReader(MeshReader): def __init__(self): super(GCodeGzReader, self).__init__() - self._supported_extensions = [".gcode.gz", ".gz"] + self._supported_extensions = [".gcode.gz"] def read(self, file_name): with open(file_name, "rb") as file: diff --git a/plugins/GCodeGzReader/__init__.py b/plugins/GCodeGzReader/__init__.py index d1f3cf34b1..67424a7d45 100644 --- a/plugins/GCodeGzReader/__init__.py +++ b/plugins/GCodeGzReader/__init__.py @@ -18,5 +18,4 @@ def getMetaData(): def register(app): app.addNonSliceableExtension(".gcode.gz") - app.addNonSliceableExtension(".gz") # in some parts only the last extension is taken. Let's make it a non sliceable extension for now return { "mesh_reader": GCodeGzReader.GCodeGzReader() }