summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorYakov Goldberg <yakov.g@samsung.com>2014-12-02 17:39:44 +0200
committerYakov Goldberg <yakov.g@samsung.com>2014-12-03 16:50:07 +0200
commitfe0f4596a371e3ba026653d10530806c4e4fc6b6 (patch)
tree6bbec655706ec97f9aadf26e6bd30ad9ff0f34ef /src/bin
parent288a0706eb6c4a59d3d3f6240b17c7ce08d9687f (diff)
Make undo to iterate mementos in reverse order
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/egui_gui/editor.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/bin/egui_gui/editor.c b/src/bin/egui_gui/editor.c
index f98da96..8af4379 100644
--- a/src/bin/egui_gui/editor.c
+++ b/src/bin/egui_gui/editor.c
@@ -1925,10 +1925,18 @@ static Eina_Bool
1925_editor_undo(const Gui_Context *ctx) 1925_editor_undo(const Gui_Context *ctx)
1926{ 1926{
1927 EINA_SAFETY_ON_NULL_RETURN_VAL(ctx, EINA_FALSE); 1927 EINA_SAFETY_ON_NULL_RETURN_VAL(ctx, EINA_FALSE);
1928 const Gui_Memento *memento, *head_memento; 1928 const Gui_Memento *memento, *head_memento, *tmp;
1929 /* Save head memento for post function. */ 1929 /* Save head memento for post function. */
1930 head_memento = memento = gui_context_current_memento_get(ctx); 1930 head_memento = memento = gui_context_current_memento_get(ctx);
1931 1931
1932 /* Find last element of the list */
1933 tmp = gui_memento_next(memento);
1934 while (tmp)
1935 {
1936 memento = tmp;
1937 tmp = gui_memento_next(memento);
1938 }
1939
1932 while (memento) 1940 while (memento)
1933 { 1941 {
1934 Gui_Memento_Type type = gui_memento_type_get(memento); 1942 Gui_Memento_Type type = gui_memento_type_get(memento);
@@ -2081,7 +2089,7 @@ _editor_undo(const Gui_Context *ctx)
2081 default: 2089 default:
2082 ERR("case - default"); 2090 ERR("case - default");
2083 } 2091 }
2084 memento = gui_memento_next(memento); 2092 memento = gui_memento_prev(memento);
2085 } 2093 }
2086 2094
2087 /* Update propview. */ 2095 /* Update propview. */