summaryrefslogtreecommitdiff
path: root/src/lib/elementary/efl_ui_format.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/elementary/efl_ui_format.c')
-rw-r--r--src/lib/elementary/efl_ui_format.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/src/lib/elementary/efl_ui_format.c b/src/lib/elementary/efl_ui_format.c
index c4dc85353d..c24111466c 100644
--- a/src/lib/elementary/efl_ui_format.c
+++ b/src/lib/elementary/efl_ui_format.c
@@ -336,15 +336,19 @@ _efl_ui_format_decimal_places_get(Eo *obj EINA_UNUSED, Efl_Ui_Format_Data *pd)
EOLIAN static void
_efl_ui_format_efl_object_destructor(Eo *obj, Efl_Ui_Format_Data *pd EINA_UNUSED)
{
- /* Legacy widgets keep their own formatting data and have their own destructors */
- if (!elm_widget_is_legacy(obj))
- {
- /* Otherwise, free formatting data */
- efl_ui_format_func_set(obj, NULL, NULL, NULL);
- efl_ui_format_values_set(obj, NULL);
- efl_ui_format_string_set(obj, NULL, 0);
- }
- efl_destructor(efl_super(obj, EFL_UI_FORMAT_MIXIN));
+ if (pd->format_func_free)
+ {
+ efl_ui_format_func_set(obj, NULL, NULL, NULL);
+ }
+ if (pd->format_values)
+ {
+ efl_ui_format_values_set(obj, NULL);
+ }
+ if (pd->format_string_type)
+ {
+ efl_ui_format_string_set(obj, NULL, 0);
+ }
+ efl_destructor(efl_super(obj, EFL_UI_FORMAT_MIXIN));
}
#include "efl_ui_format.eo.c"