From 571df43b6d2348fd4db4b0275c8ed55e760ab353 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Tue, 20 Oct 2009 22:05:04 +0100 Subject: [PATCH] text: Invalidate caches and sizes in set_text_internal() The change in commit 3bbc96e17e5a03ba931c86a5cd2a0ecaa2a3b77b moved the :text property setter to use set_text_internal(); this function does not invalidate the Layout cache and does not queue a relayout, thus breaking the behaviour of ClutterText when setting the contents of the actor using the property. http://bugzilla.openedhand.com/show_bug.cgi?id=1851 --- clutter/clutter-text.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/clutter/clutter-text.c b/clutter/clutter-text.c index 92b884824..f2be3ea27 100644 --- a/clutter/clutter-text.c +++ b/clutter/clutter-text.c @@ -804,6 +804,10 @@ clutter_text_set_text_internal (ClutterText *self, clutter_text_set_selection_bound (self, -1); } + clutter_text_dirty_cache (self); + + clutter_actor_queue_relayout (CLUTTER_ACTOR (self)); + g_signal_emit (self, text_signals[TEXT_CHANGED], 0); g_object_notify (G_OBJECT (self), "text"); @@ -3443,10 +3447,6 @@ clutter_text_set_text (ClutterText *self, clutter_text_set_use_markup_internal (self, FALSE); clutter_text_set_text_internal (self, text ? text : ""); - - clutter_text_dirty_cache (self); - - clutter_actor_queue_relayout (CLUTTER_ACTOR (self)); } /** @@ -3479,10 +3479,6 @@ clutter_text_set_markup (ClutterText *self, clutter_text_set_markup_internal (self, markup); else clutter_text_set_text_internal (self, ""); - - clutter_text_dirty_cache (self); - - clutter_actor_queue_relayout (CLUTTER_ACTOR (self)); } /**