yakov pushed a commit to branch master.

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

commit f5924f50284d58b29f4583b7cd8e55d39e0dea64
Author: Yakov Goldberg <yako...@samsung.com>
Date:   Mon Nov 9 17:39:45 2015 +0200

    Change call _memento_new_cb() at finalize
    
    Memento finalize should always call a callback, which enables/disables
    undo/redo buttons.
---
 src/lib/gui_widget.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/lib/gui_widget.c b/src/lib/gui_widget.c
index af78dde..1d344d3 100644
--- a/src/lib/gui_widget.c
+++ b/src/lib/gui_widget.c
@@ -4039,14 +4039,15 @@ context_memento_finalize(Gui_Context *ctx)
           {
              context_memento_move_to_prev(ctx);
              context_memento_discard(ctx);
-             return;
+             goto end;
           }
      }
-   if (_new_memento_cb) _new_memento_cb(_new_memento_data);
    // add changes on ctx HERE
    ctx->not_updated_mementos = eina_list_append(ctx->not_updated_mementos, 
mem);
    ctx->not_updated_mementos_direction = EINA_TRUE;
    updater_wake(ctx);
+end:
+   if (_new_memento_cb) _new_memento_cb(_new_memento_data);
 }
 
 /* FIXME: remove this func, when editor_undo will move to gui_widget. */

-- 


Reply via email to