From 4df1f1a6ddeb0963f31be6d6d967397cc77c8bd4 Mon Sep 17 00:00:00 2001 From: Sergio Villar Senin Date: Wed, 14 May 2008 07:43:43 +0000 Subject: [PATCH] * Fixes NB#85454, do not undo the disable rich text in the editor pmo-trunk-r4525 --- src/maemo/modest-msg-edit-window.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/maemo/modest-msg-edit-window.c b/src/maemo/modest-msg-edit-window.c index a4c83fe..5a4180c 100644 --- a/src/maemo/modest-msg-edit-window.c +++ b/src/maemo/modest-msg-edit-window.c @@ -1219,9 +1219,17 @@ set_msg (ModestMsgEditWindow *self, TnyMsg *msg, gboolean preserve_is_rich) if (preserve_is_rich && !is_html) { wp_text_buffer_enable_rich_text (WP_TEXT_BUFFER (priv->text_buffer), FALSE); + /* We must do this here in order to reset the undo + list, because otherwise this action could be + reverted */ + wp_text_buffer_reset_buffer (WP_TEXT_BUFFER (priv->text_buffer), FALSE); /* Get the default format required from configuration */ } else if (!modest_conf_get_bool (modest_runtime_get_conf (), MODEST_CONF_PREFER_FORMATTED_TEXT, NULL)) { wp_text_buffer_enable_rich_text (WP_TEXT_BUFFER (priv->text_buffer), FALSE); + /* We must do this here in order to reset the undo + list, because otherwise this action could be + reverted */ + wp_text_buffer_reset_buffer (WP_TEXT_BUFFER (priv->text_buffer), FALSE); } /* Set the default focus depending on having already a To: field or not */ -- 1.7.9.5