Commit 97cbafde authored by Joanmarie Diggs's avatar Joanmarie Diggs

Renable preservation of MathML tree when expanding EOCs

Add sanity check to ensure we have a tree before trying to preserve it
parent 4fb30fe8
......@@ -727,6 +727,9 @@ class Utilities(script_utilities.Utilities):
return [ext.x, ext.y, ext.width, ext.height]
def _preserveTree(self, obj):
if not (obj and obj.childCount):
return False
if self.isMathTopLevel(obj):
return True
......@@ -762,7 +765,7 @@ class Utilities(script_utilities.Utilities):
childText = ""
if True or not self._preserveTree(child):
if not self._preserveTree(child):
childText = self.expandEOCs(child)
utterances = self._script.speechGenerator.generateSpeech(child)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment