Filter images from DF open screen

CURA-8233
This commit is contained in:
Jaime van Kessel 2021-05-17 14:12:46 +02:00
parent 90eb2bfbdc
commit 2a304ce90a
No known key found for this signature in database
GPG key ID: 3710727397403C91

View file

@ -385,6 +385,20 @@ class DigitalFactoryController(QObject):
def _applicationInitializationFinished(self) -> None:
self._supported_file_types = self._application.getInstance().getMeshFileHandler().getSupportedFileTypesRead()
# Although cura supports these, it's super confusing in this context to show them.
if "jpg" in self._supported_file_types:
del self._supported_file_types["jpg"]
if "jpeg" in self._supported_file_types:
del self._supported_file_types["jpeg"]
if "png" in self._supported_file_types:
del self._supported_file_types["png"]
if "bmp" in self._supported_file_types:
del self._supported_file_types["bmp"]
if "gif" in self._supported_file_types:
del self._supported_file_types["gif"]
print("***", self._supported_file_types)
@pyqtSlot()
def openSelectedFiles(self) -> None:
""" Downloads, then opens all files selected in the Qt frontend open dialog.