mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 19:49:00 +08:00
Set name directly in metadata when clearing
Because the setName function checks if the name is equal to the previous name, but at that point the previous name doesn't exist. Contributes to issue CURA-4243.
This commit is contained in:
parent
8eaec149fa
commit
d24fa3bc3b
@ -386,8 +386,10 @@ class XmlMaterialProfile(InstanceContainer):
|
||||
first.append(element)
|
||||
|
||||
def clearData(self):
|
||||
self._metadata = {"id": self.getId()}
|
||||
self.setName("")
|
||||
self._metadata = {
|
||||
"id": self.getId(),
|
||||
"name": ""
|
||||
}
|
||||
self._definition = None
|
||||
self._instances = {}
|
||||
self._read_only = False
|
||||
|
Loading…
x
Reference in New Issue
Block a user