rimmed pushed a commit to branch master.

http://git.enlightenment.org/tools/eflete.git/commit/?id=4e1f72df92f4589f26d5bfbf2751474a31514405

commit 4e1f72df92f4589f26d5bfbf2751474a31514405
Author: Vitalii Vorobiov <vi.vorob...@samsung.com>
Date:   Tue Sep 20 16:45:21 2016 +0300

    editor_group: predeletion signal for group_data items
    
    @fix
---
 src/bin/common/signals.h      |  1 +
 src/bin/editor/editor_group.c | 10 +++++++++-
 src/bin/editor/editor_part.c  |  4 ++++
 src/bin/ui/tabs.c             |  2 +-
 4 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/src/bin/common/signals.h b/src/bin/common/signals.h
index 2e448b4..8b19a2f 100644
--- a/src/bin/common/signals.h
+++ b/src/bin/common/signals.h
@@ -473,6 +473,7 @@ typedef struct {
  *
  * @ingroup Window
  */
+#define SIGNAL_EDITOR_GROUP_DATA_PREDELETED 
"SIGNAL_EDITOR_GROUP_DATA_PREDELETED"
 #define SIGNAL_EDITOR_GROUP_DATA_DELETED "SIGNAL_EDITOR_GROUP_DATA_DELETED"
 
 typedef struct {
diff --git a/src/bin/editor/editor_group.c b/src/bin/editor/editor_group.c
index 0e670e6..93a2893 100644
--- a/src/bin/editor/editor_group.c
+++ b/src/bin/editor/editor_group.c
@@ -374,7 +374,15 @@ editor_group_data_del(Evas_Object *edit_object, Change 
*change, Eina_Bool merge
    assert(item_name != NULL);
 
    event_info = eina_stringshare_add(item_name);
-   if (!_editor_signals_blocked) evas_object_smart_callback_call(ap.win, 
SIGNAL_EDITOR_GROUP_DATA_DELETED, (void *)event_info);
+   if (!_editor_signals_blocked)
+     {
+        /* so in here we need to delete part from workspace, groupedit,
+           all kind of UI part lists since they use original Resource 
structure,
+           and only after that we can finally delete it,
+           so keep those signals in this order please */
+        evas_object_smart_callback_call(ap.win, 
SIGNAL_EDITOR_GROUP_DATA_PREDELETED, (void *)event_info);
+        evas_object_smart_callback_call(ap.win, 
SIGNAL_EDITOR_GROUP_DATA_DELETED, (void *)event_info);
+     }
 
    if (change)
      {
diff --git a/src/bin/editor/editor_part.c b/src/bin/editor/editor_part.c
index d100863..fee6880 100644
--- a/src/bin/editor/editor_part.c
+++ b/src/bin/editor/editor_part.c
@@ -732,6 +732,10 @@ editor_part_item_del(Evas_Object *edit_object, Change 
*change, Eina_Bool merge _
    event_info.item_name = eina_stringshare_add(item_name);
    if (!_editor_signals_blocked)
      {
+        /* so in here we need to delete part from workspace, groupedit,
+           all kind of UI part lists since they use original Resource 
structure,
+           and only after that we can finally delete it,
+           so keep those signals in this order please */
         evas_object_smart_callback_call(ap.win, 
SIGNAL_EDITOR_PART_ITEM_PREDELETED, (void *)&event_info);
         evas_object_smart_callback_call(ap.win, 
SIGNAL_EDITOR_PART_ITEM_DELETED, (void *)&event_info);
      }
diff --git a/src/bin/ui/tabs.c b/src/bin/ui/tabs.c
index 02d2844..e0833f6 100644
--- a/src/bin/ui/tabs.c
+++ b/src/bin/ui/tabs.c
@@ -1029,7 +1029,7 @@ tabs_add(void)
    evas_object_smart_callback_add(ap.win, SIGNAL_EDITOR_PROGRAM_ADDED, 
_editor_program_added_cb, NULL);
    evas_object_smart_callback_add(ap.win, SIGNAL_EDITOR_PROGRAM_PREDELETED, 
_editor_program_deleted_cb, NULL);
    evas_object_smart_callback_add(ap.win, SIGNAL_EDITOR_GROUP_DATA_ADDED, 
_editor_group_data_added_cb, NULL);
-   evas_object_smart_callback_add(ap.win, SIGNAL_EDITOR_GROUP_DATA_DELETED, 
_editor_group_data_deleted_cb, NULL);
+   evas_object_smart_callback_add(ap.win, SIGNAL_EDITOR_GROUP_DATA_PREDELETED, 
_editor_group_data_deleted_cb, NULL);
 
    evas_object_smart_callback_add(ap.win, signals.shortcut.add.part, 
_shortcut_add_part_cb, NULL);
    evas_object_smart_callback_add(ap.win, signals.shortcut.add.item, 
_shortcut_add_part_item_cb, NULL);

-- 


Reply via email to