From 190b7d951432e8ea3da85e2a1480a7c9ed61fe5d Mon Sep 17 00:00:00 2001 From: Nicola Fontana Date: Wed, 23 Sep 2009 17:22:26 +0200 Subject: [PATCH] [AdgToyText] Forcibly unset the font in global-changed When changing the global map, the font could be recomputed if this change involves something deeper than a translation. The font caching (that is avoiding the font recomputation when not needed) is done in the AdgFontStyle class: there is no sane reason to double the caching algorithm also inside the "global-changed" signal. --- adg/adg-toy-text.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/adg/adg-toy-text.c b/adg/adg-toy-text.c index 222c2583..ff109000 100644 --- a/adg/adg-toy-text.c +++ b/adg/adg-toy-text.c @@ -283,22 +283,9 @@ adg_toy_text_set_label(AdgToyText *toy_text, const gchar *label) static void global_changed(AdgEntity *entity) { - AdgMatrix old, new; - - adg_entity_get_global_matrix(entity, &old); + unset_font((AdgToyText *) entity); PARENT_ENTITY_CLASS->global_changed(entity); - - adg_entity_get_global_matrix(entity, &new); - - /* The scaled font should be recomputed only if the two matrices - * does not match (the translation is not considered) */ - if (old.xx == new.xx && old.yy == new.yy && - old.xy == new.xy && old.yx == new.yx) - return; - - /* The matrices does not match: invalidate the font cache */ - unset_font((AdgToyText *) entity); } static void -- 2.11.4.GIT