From dd584b9f79ec41b53ca620ae534fcf84f12e30a9 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Mon, 8 Aug 2016 14:27:26 +0900 Subject: [PATCH] efl - edje entry - dont emit changed on markup set unless text changed if the text didnt actually change we generat a lot of noise in changed signals for no change at all in text. shortcut this and check the new and old text and compare ptrs, 0 length and strings etc. this fixes T4045 @fix --- src/lib/edje/edje_entry.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/lib/edje/edje_entry.c b/src/lib/edje/edje_entry.c index 85d9e31e52..80de1e1a63 100644 --- a/src/lib/edje/edje_entry.c +++ b/src/lib/edje/edje_entry.c @@ -3112,11 +3112,22 @@ void _edje_entry_text_markup_set(Edje_Real_Part *rp, const char *text) { Entry *en; + const char *ptext; if ((rp->type != EDJE_RP_TYPE_TEXT) || (!rp->typedata.text)) return; en = rp->typedata.text->entry_data; if (!en) return; + ptext = evas_object_textblock_text_markup_get(rp->object); + // some simple "do nothing if the text is the same" logic + if (ptext == text) return; + // if prev and cur is empty + if (!ptext) ptext = ""; + if (!text) text = ""; + if ((!ptext[0]) && (!text[0])) return; + // same content + if (!strcmp(ptext, text)) return; + _edje_entry_imf_context_reset(rp); // set text as markup _sel_clear(en->ed, en->cursor, rp->object, en);