yakov pushed a commit to branch master.

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

commit e153844b7e098a2fdaadd67cbbccc1d3b6a85001
Author: Yakov Goldberg <yako...@samsung.com>
Date:   Wed Dec 9 17:39:09 2015 +0200

    Fix showing selection border of zero size
    
    When no widget was selected, there was border of zero size shown.
    Plus some other refactoring and cleaning.
---
 src/bin/gui/editor.c | 23 ++---------------------
 1 file changed, 2 insertions(+), 21 deletions(-)

diff --git a/src/bin/gui/editor.c b/src/bin/gui/editor.c
index c20e0a7..6c18563 100644
--- a/src/bin/gui/editor.c
+++ b/src/bin/gui/editor.c
@@ -473,25 +473,11 @@ _editor_wdg_selected_set(const Gui_Widget *wdg)
    const Gui_Widget *old_wdg = _editor_wdg_selected_get();
    if ((old_wdg) && (old_wdg == wdg)) return;
 
-   /* Hide previous border*/
-   if (old_wdg)
-     {
-       // _wdg_border_draw(old_wdg, EINA_FALSE, BORDER_SELECTION);
-     }
-   else
-     {
-        /* During context call _win_resize() will be called.
-         * It will draw border around win, but widget was not selected yet.
-         * So need to hide border. */
-        //_wdg_border_draw(NULL, EINA_FALSE, BORDER_SELECTION);
-     }
-
    /* Show new border*/
+   Gui_Context *ctx = _active_context_get();
+   gui_context_data_set(ctx, SELECTED_WDG, (Gui_Widget *) wdg);
    if (wdg)
      {
-        Gui_Context *ctx = (Gui_Context *) wdg_context_get(wdg);
-        gui_context_data_set(ctx, SELECTED_WDG, (Gui_Widget *) wdg);
-
         /* Stack up parent frame */
         const Gui_Widget *main_wdg = wdg_main_wdg_get(wdg);
         Main_Wdg_Info *wi = wdg_data_get(main_wdg, MAIN_WDG_INFO);
@@ -502,11 +488,6 @@ _editor_wdg_selected_set(const Gui_Widget *wdg)
         /* Set focus */
         eo_do(obj, evas_obj_focus_set(EINA_TRUE));
      }
-   else
-     {
-        gui_context_data_set(_active_context_get(), SELECTED_WDG, NULL);
-        _wdg_border_draw(NULL, EINA_TRUE, BORDER_SELECTION);
-     }
 }
 
 static void

-- 


Reply via email to