jackdanielz pushed a commit to branch master.

http://git.enlightenment.org/tools/erigo.git/commit/?id=e04fa346ff6caf5aa890e1342d94336b022f9270

commit e04fa346ff6caf5aa890e1342d94336b022f9270
Author: Daniel Zaoui <daniel.za...@samsung.com>
Date:   Thu Nov 26 11:57:26 2015 +0200

    Invoke object selection when updating is done on memento
---
 src/bin/gui/editor.c | 13 ++++++++++++-
 src/lib/updater.c    |  8 ++++----
 2 files changed, 16 insertions(+), 5 deletions(-)

diff --git a/src/bin/gui/editor.c b/src/bin/gui/editor.c
index 16b4b20..42dd73f 100644
--- a/src/bin/gui/editor.c
+++ b/src/bin/gui/editor.c
@@ -4665,12 +4665,23 @@ _mouse_wheel_cb(void *data EINA_UNUSED, int type 
EINA_UNUSED, void *ev EINA_UNUS
 }
 
 static void
-_context_changed_cb(void *data EINA_UNUSED, Memento *mem EINA_UNUSED, 
Eina_Bool dir EINA_UNUSED)
+_context_changed_cb(void *data EINA_UNUSED, Memento *mem, Eina_Bool dir 
EINA_UNUSED)
 {
    const Gui_Context *ctx = _active_context_get();
    eo_do(g->main_win->toolbar_redo_it, 
elm_wdg_item_disabled_set(context_can_redo(ctx) ? EINA_FALSE : EINA_TRUE));
    eo_do(g->main_win->toolbar_undo_it, 
elm_wdg_item_disabled_set(context_can_undo(ctx) ? EINA_FALSE : EINA_TRUE));
    _canvas_name_update(ctx, EINA_FALSE);
+   if (mem)
+     {
+        const Eina_List *cmds = memento_commands_get(mem), *itr;
+        Memento_Command *cmd;
+        EINA_LIST_FOREACH(cmds, itr, cmd)
+          {
+             Eid *eid = memento_command_wdg_get(cmd);
+             Gui_Widget *wdg = wdg_get(eid);
+             if (wdg) objtree_item_selected_set(wdg);
+          }
+     }
 }
 
 void
diff --git a/src/lib/updater.c b/src/lib/updater.c
index bcb9ec2..566278e 100644
--- a/src/lib/updater.c
+++ b/src/lib/updater.c
@@ -258,10 +258,10 @@ _update_check(void *data EINA_UNUSED)
                              break;
                          }
                     }
-               }
-             EINA_LIST_FOREACH(_completion_cbs, itr2, info)
-               {
-                  info->cb(info->data, mem, mem_dir);
+                  EINA_LIST_FOREACH(_completion_cbs, itr2, info)
+                    {
+                       info->cb(info->data, mem, mem_dir);
+                    }
                }
           }
         Eina_List *forced_wdgs_infos = gui_context_data_get(ctx, 
CONTEXT_FORCE_WDGS_KEY);

-- 


Reply via email to