[evolution/wip/webkit2] Fix the undo&redo for inserting a new table



commit af55e9dded8d6ab08f38ac4b1c7caab3357206a2
Author: Tomas Popela <tpopela redhat com>
Date:   Fri Jul 22 11:54:42 2016 +0200

    Fix the undo&redo for inserting a new table

 .../web-extension/e-dialogs-dom-functions.c        |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/modules/webkit-editor/web-extension/e-dialogs-dom-functions.c 
b/modules/webkit-editor/web-extension/e-dialogs-dom-functions.c
index c948b42..5e7c949 100644
--- a/modules/webkit-editor/web-extension/e-dialogs-dom-functions.c
+++ b/modules/webkit-editor/web-extension/e-dialogs-dom-functions.c
@@ -1431,9 +1431,8 @@ e_dialogs_dom_table_save_history_on_exit (EEditorPage *editor_page)
        ev->data.dom.to = webkit_dom_node_clone_node_with_error (
                WEBKIT_DOM_NODE (element), TRUE, NULL);
 
-       if (!webkit_dom_node_is_equal_node (ev->data.dom.from, ev->data.dom.to)) {
-               e_editor_dom_selection_get_coordinates (editor_page, &ev->after.start.x, &ev->after.start.y, 
&ev->after.end.x, &ev->after.end.y);
-       } else {
+       if (ev->data.dom.from && webkit_dom_node_is_equal_node (ev->data.dom.from, ev->data.dom.to))
                e_editor_undo_redo_manager_remove_current_history_event (manager);
-       }
+       else
+               e_editor_dom_selection_get_coordinates (editor_page, &ev->after.start.x, &ev->after.start.y, 
&ev->after.end.x, &ev->after.end.y);
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]