jackdanielz pushed a commit to branch master.

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

commit cbe3445242d9bc8ede5b046faec1adc0e87013b8
Author: Daniel Zaoui <daniel.za...@samsung.com>
Date:   Sun Nov 8 14:46:47 2015 +0200

    Block context reload when not needed
---
 src/bin/gui/editor.c  | 1 +
 src/bin/gui/objtree.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/src/bin/gui/editor.c b/src/bin/gui/editor.c
index 4a7d683..0c38f23 100644
--- a/src/bin/gui/editor.c
+++ b/src/bin/gui/editor.c
@@ -4192,6 +4192,7 @@ static void
 _switch_to_context(Gui_Context *ctx)
 {
    Gui_Context *prev_ctx = _active_context_get();
+   if (prev_ctx == ctx) return;
    if (prev_ctx)
      {
         _context_main_widgets_visibility_set(prev_ctx, EINA_FALSE);
diff --git a/src/bin/gui/objtree.c b/src/bin/gui/objtree.c
index 2e84f48..1792515 100644
--- a/src/bin/gui/objtree.c
+++ b/src/bin/gui/objtree.c
@@ -316,6 +316,7 @@ objtree_item_remove(const Gui_Widget *wdg)
 void
 objtree_context_set(const Gui_Context *ctx)
 {
+   if (_active_ctx == ctx) return;
    _active_ctx = ctx;
    if (!ctx) return;
 

-- 


Reply via email to