use get_text_properties instead of id as index
This commit is contained in:
parent
88cfaf3be7
commit
2ace31a246
1 changed files with 3 additions and 2 deletions
|
@ -1829,9 +1829,10 @@ def detect_text():
|
||||||
print(" {o.name=} a textobject")
|
print(" {o.name=} a textobject")
|
||||||
print(f" {type(o)=} {o.name=}")
|
print(f" {type(o)=} {o.name=}")
|
||||||
current_text_id = int(o[butils.get_key("text_id")])
|
current_text_id = int(o[butils.get_key("text_id")])
|
||||||
|
text_properties = butils.get_text_properties(current_text_id)
|
||||||
if (
|
if (
|
||||||
len(abc3d_data.available_texts) > current_text_id
|
text_properties is not None
|
||||||
and abc3d_data.available_texts[current_text_id].text_object == o
|
and text_properties.text_object == o
|
||||||
):
|
):
|
||||||
print(" {o.name=} seems fine")
|
print(" {o.name=} seems fine")
|
||||||
pass
|
pass
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue