Arch: consider DraftText objects in the section plane for compatibility

After the reorganization of the Draft Workbench,
the `'DraftText'` objects are now of Proxy.Type `'Text'`.
In the `DraftAnnotation` class the `__setstate__` method
was defined to automatically migrate the Type.

The `Arch SectionPlane` only handles `'Text'` objects. If for
some reason there is still an old `'DraftText'` object
which has not been migrated to the new Type, it won't be found.
This is corrected by adding `'DraftText'` to the list of objects
to process.
This commit is contained in:
vocx-fc
2020-10-01 10:30:26 -05:00
committed by Yorik van Havre
parent 611bcdd4c4
commit f799717f4d
2 changed files with 3 additions and 3 deletions

View File

@@ -131,13 +131,13 @@ class DraftAnnotation(object):
# the 'DraftText' type was changed to 'Text' type
if state["Type"] == "DraftText":
state["Type"] = "Text"
_info = "migrate 'DraftText' type to 'Text'"
_info = "migrated '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'"
_info = "migrated 'DraftText' type to 'Text'"
_wrn("v0.19, " + _tr(_info))
self.Type = state