fixed temp issue for dealing with xml and node positions as floats, updated shape metadata to save bold/italic/underline options and read them back from xml

This commit is contained in:
Blake Harnden 2019-12-06 22:33:21 -08:00
parent 71df2a3b7f
commit 0308a4c8d7
5 changed files with 228 additions and 207 deletions

View file

@ -117,15 +117,21 @@ class NodeElement:
def add_position(self):
x = self.node.position.x
if x is not None:
x = int(x)
y = self.node.position.y
if y is not None:
y = int(y)
z = self.node.position.z
if z is not None:
z = int(z)
lat, lon, alt = None, None, None
if x is not None and y is not None:
lat, lon, alt = self.session.location.getgeo(x, y, z)
position = etree.SubElement(self.element, "position")
add_attribute(position, "x", int(x))
add_attribute(position, "y", int(y))
add_attribute(position, "z", int(z))
add_attribute(position, "x", x)
add_attribute(position, "y", y)
add_attribute(position, "z", z)
add_attribute(position, "lat", lat)
add_attribute(position, "lon", lon)
add_attribute(position, "alt", alt)