mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Use MimeTypeDatabase to find loaded file extension and set proper project name
CURA-5323
This commit is contained in:
parent
304c23b87e
commit
9779c41071
3 changed files with 35 additions and 18 deletions
|
@ -5,10 +5,20 @@ from UM.FileHandler.FileReader import FileReader
|
|||
from UM.Mesh.MeshReader import MeshReader
|
||||
from UM.i18n import i18nCatalog
|
||||
from UM.Preferences import Preferences
|
||||
from UM.MimeTypeDatabase import MimeTypeDatabase, MimeType
|
||||
|
||||
catalog = i18nCatalog("cura")
|
||||
from . import MarlinFlavorParser, RepRapFlavorParser
|
||||
|
||||
|
||||
MimeTypeDatabase.addMimeType(
|
||||
MimeType(
|
||||
name = "application/x-cura-gcode-file",
|
||||
comment = "Cura GCode File",
|
||||
suffixes = ["gcode", "gcode.gz"]
|
||||
)
|
||||
)
|
||||
|
||||
# Class for loading and parsing G-code files
|
||||
class GCodeReader(MeshReader):
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue