mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-13 00:59:01 +08:00
Remove some code duplication in DF image filtering
CURA-8233
This commit is contained in:
parent
3018485077
commit
45f8f3ba3c
@ -385,18 +385,10 @@ class DigitalFactoryController(QObject):
|
|||||||
def _applicationInitializationFinished(self) -> None:
|
def _applicationInitializationFinished(self) -> None:
|
||||||
self._supported_file_types = self._application.getInstance().getMeshFileHandler().getSupportedFileTypesRead()
|
self._supported_file_types = self._application.getInstance().getMeshFileHandler().getSupportedFileTypesRead()
|
||||||
|
|
||||||
# Although cura supports these, it's super confusing in this context to show them.
|
# Although Cura supports these, it's super confusing in this context to show them.
|
||||||
if "jpg" in self._supported_file_types:
|
for extension in ["jpg", "jpeg", "png", "bmp", "gif"]:
|
||||||
del self._supported_file_types["jpg"]
|
if extension in self._supported_file_types:
|
||||||
if "jpeg" in self._supported_file_types:
|
del self._supported_file_types[extension]
|
||||||
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"]
|
|
||||||
|
|
||||||
|
|
||||||
@pyqtSlot()
|
@pyqtSlot()
|
||||||
def openSelectedFiles(self) -> None:
|
def openSelectedFiles(self) -> None:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user