mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 21:38:58 +08:00
Don't order the fdmprinter.def.json
The order in the settings in the front-end depends on it
This commit is contained in:
parent
5e942dd269
commit
6243cc11bd
@ -23,7 +23,6 @@ METADATA_SORT_PRIORITY = {
|
|||||||
"platform": "4",
|
"platform": "4",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class DefJsonFormatter(FileFormatter):
|
class DefJsonFormatter(FileFormatter):
|
||||||
def formatFile(self, file: Path):
|
def formatFile(self, file: Path):
|
||||||
""" Format .def.json files according to the rules in settings.
|
""" Format .def.json files according to the rules in settings.
|
||||||
@ -34,7 +33,7 @@ class DefJsonFormatter(FileFormatter):
|
|||||||
|
|
||||||
definition = json.loads(file.read_text(), object_pairs_hook=OrderedDict)
|
definition = json.loads(file.read_text(), object_pairs_hook=OrderedDict)
|
||||||
|
|
||||||
if self._settings["format"].get("format-definition-sort-keys", True):
|
if self._settings["format"].get("format-definition-sort-keys", True) and file.stem.split(".")[0] != "fdmprinter":
|
||||||
definition = self.order_keys(definition)
|
definition = self.order_keys(definition)
|
||||||
|
|
||||||
content = json.dumps(definition, indent=self._settings["format"].get("format-definition-indent", 4))
|
content = json.dumps(definition, indent=self._settings["format"].get("format-definition-indent", 4))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user