diff --git a/src/Mod/Draft/draftobjects/draft_annotation.py b/src/Mod/Draft/draftobjects/draft_annotation.py index c8e55b7f06..e243559331 100644 --- a/src/Mod/Draft/draftobjects/draft_annotation.py +++ b/src/Mod/Draft/draftobjects/draft_annotation.py @@ -125,8 +125,18 @@ class DraftAnnotation(object): """ if state: if isinstance(state, dict) and ("Type" in state): + # During the migration of the classes + # the 'DraftText' type was changed to 'Text' type + if state["Type"] == "DraftText": + state["Type"] = "Text" + _info = "migrate 'DraftText' type to 'Text'" + _wrn("v0.19, " + _tr(_info)) self.Type = state["Type"] else: + if state == "DraftText": + state = "Text" + _info = "migrate 'DraftText' type to 'Text'" + _wrn("v0.19, " + _tr(_info)) self.Type = state def execute(self, obj):