elm_code: Don't refresh if fonts did not change
authorAndy Williams <andy@andywilliams.me>
Thu, 6 Apr 2017 22:29:38 +0000 (23:29 +0100)
committerAndy Williams <andy@andywilliams.me>
Thu, 6 Apr 2017 22:30:00 +0000 (23:30 +0100)
src/lib/elementary/elm_code_widget.c

index fa78a79..095998b 100644 (file)
@@ -2056,6 +2056,9 @@ _elm_code_widget_font_set(Eo *obj EINA_UNUSED, Elm_Code_Widget_Data *pd,
    if (!face)
      face = "Mono";
 
+   if (size == pd->font_size && !strcmp(face, pd->font_name))
+     return;
+
    EINA_LIST_FOREACH(pd->grids, item, grid)
      {
         evas_object_textgrid_font_set(grid, face, size * elm_config_scale_get());