yakov pushed a commit to branch master.

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

commit 606971089df1fdba6d538ac481b01bb085532dd3
Author: Yakov Goldberg <yako...@samsung.com>
Date:   Tue Nov 10 16:57:35 2015 +0200

    Properly delete table cell borders when DnD
---
 src/bin/gui/editor.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/src/bin/gui/editor.c b/src/bin/gui/editor.c
index 678a15b..45d89b5 100644
--- a/src/bin/gui/editor.c
+++ b/src/bin/gui/editor.c
@@ -1425,6 +1425,7 @@ _table_borders_draw(Eo *table, int w, int h, Eina_List 
**_border_objects)
         eo_del(o);
      }
    border_objects = NULL;
+   if (!table) goto end;
    for (i = w; i >= 0; i--)
      {
         for (j = h; j >= 0; j--)
@@ -1438,6 +1439,7 @@ _table_borders_draw(Eo *table, int w, int h, Eina_List 
**_border_objects)
              border_objects = eina_list_append(border_objects, o);
           }
      }
+end:
    *_border_objects = border_objects;
 }
 
@@ -1554,13 +1556,7 @@ _drop_target_leave(void *data, Evas_Object *obj)
      {
         if (di->packed)
           {
-             Eo *o;
-             EINA_LIST_FREE(di->table_borders, o)
-               {
-                  eo_do(drop_target_wdg_eo, elm_obj_table_unpack(o));
-                  eo_del(o);
-               }
-             di->table_borders = NULL;
+             _table_borders_draw(NULL, 0, 0, &(di->table_borders));
              eo_do(drop_target_wdg_eo, elm_obj_table_unpack(di->eo_cur));
 
              const Eina_List *lst = 
wdg_obj_container_contents_list_get(drop_target_wdg), *l;
@@ -1822,6 +1818,7 @@ _drop_target_drop(Gui_Widget *drop_target_wdg, Eo 
*canvas_drop_target, const cha
 
         Object_Container_Item *ci = obj_container_item_new(prop, 
wdg_eid_get(new_wdg));
         wdg_obj_container_item_add(drop_target_wdg, ci, -1);
+        _table_borders_draw(NULL, 0, 0, &(di->table_borders));
      }
 
 end:

-- 


Reply via email to