rimmed pushed a commit to branch master.

http://git.enlightenment.org/tools/eflete.git/commit/?id=d9ef9b572d506ff9bfb25d3c34b243731179c93f

commit d9ef9b572d506ff9bfb25d3c34b243731179c93f
Author: Vitalii Vorobiov <vi.vorob...@samsung.com>
Date:   Wed Jun 15 22:13:59 2016 +0300

    editor: save and reload edje when text style was changed
    
    this will reload and update groupedit, so when None style is selected
    text would disappear, and when any other style is selected,
    style would be applied to text
    
    Fixes T3537
---
 src/bin/editor/editor_macro.h  | 3 ++-
 src/bin/editor/editor_states.c | 2 +-
 src/bin/editor/editor_text.c   | 4 ++--
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/bin/editor/editor_macro.h b/src/bin/editor/editor_macro.h
index 4f5992b..b7ebb2f 100644
--- a/src/bin/editor/editor_macro.h
+++ b/src/bin/editor/editor_macro.h
@@ -186,7 +186,7 @@ editor_state_## FUNC ##_set(Evas_Object *edit_object, 
Change *change, Eina_Bool
    return true; \
 }
 
-#define EDITOR_STATE_STRING_WITH_FALLBACK(FUNC, ATTRIBUTE, FALLBACK_VAL) \
+#define EDITOR_STATE_STRING_WITH_FALLBACK(FUNC, ATTRIBUTE, FALLBACK_VAL, SAVE) 
\
 Eina_Bool \
 editor_state_## FUNC ##_set(Evas_Object *edit_object, Change *change, 
Eina_Bool merge, Eina_Bool apply, \
                             const char *part_name, const char *state_name, 
double state_val, const char *new_val) \
@@ -235,6 +235,7 @@ editor_state_## FUNC ##_set(Evas_Object *edit_object, 
Change *change, Eina_Bool
             else \
               change_diff_add(change, diff); \
          } \
+       if (SAVE) CRIT_ON_FAIL(editor_save(edit_object)); \
        _editor_project_changed(); \
        if (!_editor_signals_blocked) evas_object_smart_callback_call(ap.win, 
SIGNAL_EDITOR_ATTRIBUTE_CHANGED, &attribute); \
      } \
diff --git a/src/bin/editor/editor_states.c b/src/bin/editor/editor_states.c
index 261cc63..a3e98fb 100644
--- a/src/bin/editor/editor_states.c
+++ b/src/bin/editor/editor_states.c
@@ -320,7 +320,7 @@ TODO("Fix edje_edit API")
 EDITOR_STATE_STRING(color_class, ATTRIBUTE_STATE_COLOR_CLASS, true)
 
 TODO("Replace with image stub")
-EDITOR_STATE_STRING_WITH_FALLBACK(image, ATTRIBUTE_STATE_IMAGE, NULL)
+EDITOR_STATE_STRING_WITH_FALLBACK(image, ATTRIBUTE_STATE_IMAGE, NULL, false)
 
 EDITOR_STATE_INT_INT_INT_INT(color, color, ATTRIBUTE_STATE_COLOR)
 EDITOR_STATE_INT_INT_INT_INT(outline_color, color2, 
ATTRIBUTE_STATE_OUTLINE_COLOR)
diff --git a/src/bin/editor/editor_text.c b/src/bin/editor/editor_text.c
index 12c441a..7c5eae2 100644
--- a/src/bin/editor/editor_text.c
+++ b/src/bin/editor/editor_text.c
@@ -83,6 +83,6 @@ EDITOR_STATE_STRING(text_source, ATTRIBUTE_STATE_TEXT_SOURCE, 
true)
 EDITOR_STATE_STRING(text_text_source, ATTRIBUTE_STATE_TEXT_TEXT_SOURCE, true)
 EDITOR_STATE_STRING(text, ATTRIBUTE_STATE_TEXT, true)
 
-EDITOR_STATE_STRING_WITH_FALLBACK(font, ATTRIBUTE_STATE_FONT, NULL)
+EDITOR_STATE_STRING_WITH_FALLBACK(font, ATTRIBUTE_STATE_FONT, NULL, false)
 TODO("Add style fallback here")
-EDITOR_STATE_STRING_WITH_FALLBACK(text_style, ATTRIBUTE_STATE_TEXT_STYLE, NULL)
+EDITOR_STATE_STRING_WITH_FALLBACK(text_style, ATTRIBUTE_STATE_TEXT_STYLE, 
NULL, true)

-- 


Reply via email to