summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorYakov Goldberg <yakov.g@samsung.com>2014-12-02 17:21:28 +0200
committerYakov Goldberg <yakov.g@samsung.com>2014-12-08 19:12:12 +0200
commit7ca86758789309f3af4c2d8b8873e93740e1fe30 (patch)
treef55086ab06b03d72892376cf739b80458550720b /src/bin
parent9ea556f3b798d531b79effc2ae12203f24786217 (diff)
Add meemnto support for widget's parent change
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/egui_gui/editor.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/bin/egui_gui/editor.c b/src/bin/egui_gui/editor.c
index dd1008f..d20859f 100644
--- a/src/bin/egui_gui/editor.c
+++ b/src/bin/egui_gui/editor.c
@@ -2088,6 +2088,13 @@ _editor_undo(const Gui_Context *ctx)
2088 _update_widget_on_undoredo(ctx, wdg_id, old_state); 2088 _update_widget_on_undoredo(ctx, wdg_id, old_state);
2089 break; 2089 break;
2090 } 2090 }
2091 case MEMENTO_WIDGET_PARENT:
2092 {
2093 Dep_Id *wdg_id = gui_memento_wdg_get(memento);
2094 Dep_Id *old_parent_id = (Dep_Id *) gui_memento_old_pointer_get(memento);
2095 wdg_parent_set(wdg_get(wdg_id), dep_name_get(old_parent_id));
2096 break;
2097 }
2091 case MEMENTO_ACTION: 2098 case MEMENTO_ACTION:
2092 { 2099 {
2093 Dep_Id *action_id = gui_memento_wdg_get(memento); 2100 Dep_Id *action_id = gui_memento_wdg_get(memento);
@@ -2266,6 +2273,13 @@ _editor_redo(const Gui_Context *ctx)
2266 _update_widget_on_undoredo(ctx, wdg_id, new_state); 2273 _update_widget_on_undoredo(ctx, wdg_id, new_state);
2267 break; 2274 break;
2268 } 2275 }
2276 case MEMENTO_WIDGET_PARENT:
2277 {
2278 Dep_Id *wdg_id = gui_memento_wdg_get(memento);
2279 Dep_Id *new_parent_id = (Dep_Id *) gui_memento_new_pointer_get(memento);
2280 wdg_parent_set(wdg_get(wdg_id), dep_name_get(new_parent_id));
2281 break;
2282 }
2269 case MEMENTO_ACTION: 2283 case MEMENTO_ACTION:
2270 { 2284 {
2271 Dep_Id *action_id = gui_memento_wdg_get(memento); 2285 Dep_Id *action_id = gui_memento_wdg_get(memento);
@@ -2331,6 +2345,7 @@ _editor_undo_redo_post(const Gui_Memento *memento)
2331 break; 2345 break;
2332 } 2346 }
2333 case MEMENTO_WIDGET: 2347 case MEMENTO_WIDGET:
2348 case MEMENTO_WIDGET_PARENT:
2334 { 2349 {
2335 Gui_Widget *memento_wdg = wdg_get(gui_memento_wdg_get(memento)); 2350 Gui_Widget *memento_wdg = wdg_get(gui_memento_wdg_get(memento));
2336 if (memento_wdg) 2351 if (memento_wdg)