From 2ace31a246719438515b42f252833826fbed86ac Mon Sep 17 00:00:00 2001 From: themancalledjakob Date: Sun, 25 May 2025 20:41:00 +0200 Subject: [PATCH] use get_text_properties instead of id as index --- __init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/__init__.py b/__init__.py index b2bd911..2d8ac95 100644 --- a/__init__.py +++ b/__init__.py @@ -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