Move MIME type declarations into constructors of readers

So that if you disable the plug-in, the MIME type declaration is also not added.

Fixes #4151.
This commit is contained in:
Ghostkeeper 2018-09-27 13:58:06 +02:00
parent 88ba2ac345
commit 0ce9bf61be
No known key found for this signature in database
GPG key ID: 5252B696FB5E7C7A
4 changed files with 27 additions and 25 deletions

View file

@ -11,16 +11,6 @@ except ImportError:
from UM.i18n import i18nCatalog #To translate the file format description.
from UM.Mesh.MeshWriter import MeshWriter #For the binary mode flag.
from UM.MimeTypeDatabase import MimeTypeDatabase, MimeType
MimeTypeDatabase.addMimeType(
MimeType(
name = "application/x-cura-stl-file",
comment = "Cura UFP File",
suffixes = ["ufp"]
)
)
i18n_catalog = i18nCatalog("cura")