From 3640de27c7ceb1812a795b055b13b84f7799ba88 Mon Sep 17 00:00:00 2001 From: Jan Petykiewicz Date: Tue, 29 Mar 2022 18:21:56 -0700 Subject: [PATCH] Fix OASIS loading when strings are stored by-reference --- masque/file/oasis.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/masque/file/oasis.py b/masque/file/oasis.py index f9b8d65..ed409fd 100644 --- a/masque/file/oasis.py +++ b/masque/file/oasis.py @@ -431,11 +431,16 @@ def read( elif isinstance(element, fatrec.Text): annotations = properties_to_annotations(element.properties, lib.propnames, lib.propstrings) + str_or_ref = element.get_string() + if isinstance(str_or_ref, int): + string = lib.textstrings[str_or_ref].string + else: + string = str_or_ref.string label = Label(layer=element.get_layer_tuple(), offset=element.get_xy(), repetition=repetition, annotations=annotations, - string=str(element.get_string())) + string=string) pat.labels.append(label) else: