[lasem] mathml: fix update of itex element.



commit e461fb6c6a2461adbebe85114109eed6c6b19ae4
Author: Emmanuel Pacaud <emmanuel gnome org>
Date:   Wed Sep 26 13:54:00 2012 +0200

    mathml: fix update of itex element.
    
    An update request on the itex element now forces an update of the
    embededd math element, as the style may have changed.

 src/lsmmathmlitexelement.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/src/lsmmathmlitexelement.c b/src/lsmmathmlitexelement.c
index 726300b..7d696e3 100644
--- a/src/lsmmathmlitexelement.c
+++ b/src/lsmmathmlitexelement.c
@@ -52,6 +52,11 @@ _update (LsmMathmlElement *self, LsmMathmlStyle *style)
 	GString *string;
 	gboolean need_conversion;
 
+	if (itex_element->math != NULL) {
+		lsm_dom_node_changed (LSM_DOM_NODE (itex_element->math));
+		LSM_MATHML_ELEMENT (itex_element->math)->need_measure = TRUE;
+	}
+
 	if (style->display == LSM_MATHML_DISPLAY_INLINE)
 		string = g_string_new ("$");
 	else
@@ -87,11 +92,15 @@ _update (LsmMathmlElement *self, LsmMathmlStyle *style)
 				g_object_unref (lsm_dom_node_get_owner_document (LSM_DOM_NODE (itex_element->math)));
 
 			itex_element->math = LSM_MATHML_ELEMENT (lsm_mathml_document_get_root_element (document));
-			lsm_mathml_element_update (itex_element->math, style);
 		}
 	}
 
 	g_string_free (string, FALSE);
+
+	if (itex_element->math != NULL)
+		lsm_mathml_element_update (itex_element->math, style);
+
+	self->need_measure = TRUE;
 }
 
 static const LsmMathmlBbox *



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]