use get_text_properties instead of id as index

This commit is contained in:
jrkb 2025-05-25 20:41:00 +02:00
parent 88cfaf3be7
commit 2ace31a246

View file

@ -1829,9 +1829,10 @@ def detect_text():
print(" {o.name=} a textobject")
print(f" {type(o)=} {o.name=}")
current_text_id = int(o[butils.get_key("text_id")])
text_properties = butils.get_text_properties(current_text_id)
if (
len(abc3d_data.available_texts) > current_text_id
and abc3d_data.available_texts[current_text_id].text_object == o
text_properties is not None
and text_properties.text_object == o
):
print(" {o.name=} seems fine")
pass