[gtkhtml] Paragraph style drawn incorrectly after font style change



commit c6133733cb4e7fedeb86ae7ef871363a33d3d44a
Author: Milan Crha <mcrha redhat com>
Date:   Tue Jul 2 17:01:46 2013 +0200

    Paragraph style drawn incorrectly after font style change
    
    For example, if there is a Header 1 paragraph, and it whole is selected,
    and then a bold/italic/underline is changed, then the drawn paragraph
    style is like Normal, even the above chooser still shows Header 1. Writing
    a new character makes the text drawing fixed, showing the text correctly.
    
    The issue was that HTMLObject's parent change didn't mark the object
    properties for recalculation, thus there was used stale style set, calculated
    in time when there was no parent set on the object.

 gtkhtml/htmlobject.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gtkhtml/htmlobject.c b/gtkhtml/htmlobject.c
index feae156..1768733 100644
--- a/gtkhtml/htmlobject.c
+++ b/gtkhtml/htmlobject.c
@@ -1039,6 +1039,9 @@ html_object_set_parent (HTMLObject *o,
                         HTMLObject *parent)
 {
        o->parent = parent;
+
+       /* parent change requires recalc of everything */
+       o->change = HTML_CHANGE_ALL;
 }
 
 static void


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