mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06: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
1 changed files with 4 additions and 2 deletions
|
@ -386,8 +386,10 @@ class XmlMaterialProfile(InstanceContainer):
|
||||||
first.append(element)
|
first.append(element)
|
||||||
|
|
||||||
def clearData(self):
|
def clearData(self):
|
||||||
self._metadata = {"id": self.getId()}
|
self._metadata = {
|
||||||
self.setName("")
|
"id": self.getId(),
|
||||||
|
"name": ""
|
||||||
|
}
|
||||||
self._definition = None
|
self._definition = None
|
||||||
self._instances = {}
|
self._instances = {}
|
||||||
self._read_only = False
|
self._read_only = False
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue