summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Zaoui <daniel.zaoui@samsung.com>2014-09-29 14:36:02 +0300
committerYakov Goldberg <yakov.g@samsung.com>2014-10-02 16:41:24 +0300
commitf2af441895316c77fb4b678ee724b365b2b72556 (patch)
treef90b8af0644a77614024542994a7e0924fa70ce5
parente41358b39bd1b7889ebe1f6d9b9c325cc31782da (diff)
Fix win deletion
The bug happens when the win is deleted and undo/redo is performed.
-rw-r--r--src/bin/egui_gui/editor.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/bin/egui_gui/editor.c b/src/bin/egui_gui/editor.c
index 66c8a71..fbc3bf2 100644
--- a/src/bin/egui_gui/editor.c
+++ b/src/bin/egui_gui/editor.c
@@ -1129,6 +1129,8 @@ _editor_widget_clear(Gui_Widget *wdg)
1129static void 1129static void
1130_wdg_parent_win_reload(const Gui_Widget *wdg) 1130_wdg_parent_win_reload(const Gui_Widget *wdg)
1131{ 1131{
1132 Dep_Id *wdg_id = wdg_dep_id_get(wdg);
1133 if (!wdg_get(wdg_id)) return;
1132 Gui_Widget *pwin = (Gui_Widget *) wdg_main_wdg_get(wdg); 1134 Gui_Widget *pwin = (Gui_Widget *) wdg_main_wdg_get(wdg);
1133 if (!pwin) return; 1135 if (!pwin) return;
1134 /* Remove all Eo of current window. */ 1136 /* Remove all Eo of current window. */
@@ -1142,7 +1144,7 @@ _wdg_parent_win_reload(const Gui_Widget *wdg)
1142static void 1144static void
1143_update_widget_on_undoredo(const Gui_Context *ctx, Dep_Id *wdg_id, Eina_Bool state) 1145_update_widget_on_undoredo(const Gui_Context *ctx, Dep_Id *wdg_id, Eina_Bool state)
1144{ 1146{
1145 Gui_Widget *parent; /* We need the parent to reload the win */ 1147 const Gui_Widget *parent; /* We need the parent to reload the win */
1146 Gui_Widget *wdg = wdg_get(wdg_id); 1148 Gui_Widget *wdg = wdg_get(wdg_id);
1147 if (wdg) /* On widget deletion, we delete the Eo object first */ 1149 if (wdg) /* On widget deletion, we delete the Eo object first */
1148 { 1150 {
@@ -1152,9 +1154,11 @@ _update_widget_on_undoredo(const Gui_Context *ctx, Dep_Id *wdg_id, Eina_Bool sta
1152 gui_context_dep_data_active_set(ctx, wdg_id, state); 1154 gui_context_dep_data_active_set(ctx, wdg_id, state);
1153 1155
1154 wdg = wdg_get(wdg_id); 1156 wdg = wdg_get(wdg_id);
1155 if (wdg) parent = (Gui_Widget *) wdg_parent_get(wdg); 1157 if (wdg) parent = wdg_main_wdg_get(wdg);
1156 if (parent) _wdg_parent_win_reload(parent); 1158 if (parent) _wdg_parent_win_reload(parent);
1157 objtree_item_selected_set(wdg?wdg:parent); 1159 objtree_item_selected_set(wdg?wdg:parent);
1160 _editor_wdg_selected_set(wdg?wdg:parent);
1161 propview_build(wdg?wdg:parent);
1158} 1162}
1159 1163
1160/* Undo last action */ 1164/* Undo last action */