[evolution] EHTMLEditorView - Pasting content into the indented block will not preserve formatting



commit 0b5bbe89d61e56f19f2a21451ad0998f56d957cf
Author: Tomas Popela <tpopela redhat com>
Date:   Wed Jun 29 12:11:54 2016 +0200

    EHTMLEditorView - Pasting content into the indented block will not preserve formatting
    
    Before this change it would insert a new unindented block instead of continuing
    with the indented one.

 e-util/e-html-editor-view.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/e-util/e-html-editor-view.c b/e-util/e-html-editor-view.c
index 731b405..2599603 100644
--- a/e-util/e-html-editor-view.c
+++ b/e-util/e-html-editor-view.c
@@ -8850,7 +8850,8 @@ html_editor_view_insert_converted_html_into_selection (EHTMLEditorView *view,
                clone1 = webkit_dom_node_clone_node (WEBKIT_DOM_NODE (block), FALSE);
                clone2 = webkit_dom_node_clone_node (WEBKIT_DOM_NODE (parent), FALSE);
                if (webkit_dom_node_is_equal_node (clone1, clone2) ||
-                   (WEBKIT_DOM_IS_HTML_DIV_ELEMENT (clone1) && WEBKIT_DOM_IS_HTML_DIV_ELEMENT (clone2))) {
+                   (WEBKIT_DOM_IS_HTML_DIV_ELEMENT (clone1) && WEBKIT_DOM_IS_HTML_DIV_ELEMENT (clone2) &&
+                    !element_has_class (WEBKIT_DOM_ELEMENT (clone2), "-x-evo-indented"))) {
                        fix_structure_after_pasting_multiline_content (block);
                        if (g_strcmp0 (html, "\n") == 0) {
                                WebKitDOMElement *br;


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