mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 16:48:58 +08:00
Use parseBool instead of inline variation
CURA-2138
This commit is contained in:
parent
3b1c11bfcf
commit
0e2d35a88d
@ -8,6 +8,7 @@ import xml.etree.ElementTree as ET
|
||||
import uuid
|
||||
|
||||
from UM.Logger import Logger
|
||||
from UM.Util import parseBool
|
||||
|
||||
import UM.Dictionary
|
||||
|
||||
@ -300,7 +301,7 @@ class XmlMaterialProfile(UM.Settings.InstanceContainer):
|
||||
global_setting_values[self.__material_property_setting_map[key]] = entry.text
|
||||
elif key in self.__unmapped_settings:
|
||||
if key == "hardware compatible":
|
||||
global_compatibility = entry.text.lower() not in ["no", "false", "0"]
|
||||
global_compatibility = parseBool(entry.text)
|
||||
else:
|
||||
Logger.log("d", "Unsupported material setting %s", key)
|
||||
|
||||
@ -317,7 +318,7 @@ class XmlMaterialProfile(UM.Settings.InstanceContainer):
|
||||
machine_setting_values[self.__material_property_setting_map[key]] = entry.text
|
||||
elif key in self.__unmapped_settings:
|
||||
if key == "hardware compatible":
|
||||
machine_compatibility = entry.text.lower() not in ["no", "false", "0"]
|
||||
machine_compatibility = parseBool(entry.text)
|
||||
else:
|
||||
Logger.log("d", "Unsupported material setting %s", key)
|
||||
|
||||
@ -376,7 +377,7 @@ class XmlMaterialProfile(UM.Settings.InstanceContainer):
|
||||
hotend_setting_values[self.__material_property_setting_map[key]] = entry.text
|
||||
elif key in self.__unmapped_settings:
|
||||
if key == "hardware compatible":
|
||||
hotend_compatibility = entry.text.lower() not in ["no", "false", "0"]
|
||||
hotend_compatibility = parseBool(entry.text)
|
||||
else:
|
||||
Logger.log("d", "Unsupported material setting %s", key)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user